필터 지우기
필터 지우기

How to ignore NaN values in pcolor function?

조회 수: 10 (최근 30일)
Ji Eun Lee
Ji Eun Lee 2016년 11월 6일
댓글: Ji Eun Lee 2016년 11월 7일
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?

채택된 답변

Daniel kiracofe
Daniel kiracofe 2016년 11월 6일
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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by