How to ignore NaN values in pcolor function?
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Ji Eun Lee
il 6 Nov 2016
Commentato: Ji Eun Lee
il 7 Nov 2016
I have three data lati, long, CaCO3. The size of each data is 180x1, 180x1, 180x180. lati and long don't have NaN values but CaCO3 have.
A part of CaCO3 matrix is
CaCO3 =
86.4195 88.6516 87.6645 NaN NaN
90.9402 89.1650 89.9154 NaN NaN
87.4232 94.4415 87.3036 91.3506 90.5179
NaN NaN NaN NaN NaN
NaN NaN NaN NaN NaN
NaN 91.5944 NaN NaN NaN
NaN 88.8381 87.1006 NaN NaN ......
NaN 89.5835 NaN NaN NaN
NaN 89.5548 NaN NaN NaN
87.2730 95.8932 87.5370 91.7358 91.7450
87.9113 96.3841 88.3516 89.7063 90.6103
89.8246 92.2127 90.4637 91.2455 92.1979
90.9599 93.2109 90.6547 97.5123 97.5610
When I used pcolor(long,lati.CaCO3), the result was a picture below. I think black lines represent because of NaN values, so how to ignore NaN values?
0 Commenti
Risposta accettata
Daniel kiracofe
il 6 Nov 2016
I don't think the black lines are because of the NaNs. Its coming from the default shading method, which is faceted. Try "shading flat" or "shading interp".
https://www.mathworks.com/help/matlab/ref/shading.html
Più risposte (0)
Vedere anche
Categorie
Scopri di più su NaNs in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!