Display NaNs values and apply alphadata for values different to NaNs
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Haythem Zouabi
am 11 Nov. 2020
Kommentiert: Haythem Zouabi
am 12 Nov. 2020
Hello,
I want to display the NaN values by setting an alphadata equal to 0 and at the same time apply an alphadata equal to 0.3 for values different to NaNs?
This is the code i use but it doesn't work:
im=imagesc(I)
set(im,'AlphaData',0.3);
set(im,'AlphaData',~isnan(I))
Thanks,
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 11 Nov. 2020
Try this
im = imagesc(I);
im.AlphaData = 0.3*ones(size(I));
im.AlphaData(isnan(I)) = 0;
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Colormaps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!