replace -28672 with NaN
1 回表示 (過去 30 日間)
古いコメントを表示
mahesh chathuranga
2014 年 7 月 21 日
コメント済み: mahesh chathuranga
2014 年 7 月 21 日
I have MODIS image, fill value is -28672(No data area). I want to replace those as NaN. why I am doing this is, I dont want to use those values to further calculations. I used this I(I==-28672)=NaN; but it not displayed as NaN. it displayed as 0. I dont know why it is not working.my image(I) is in type int16.
採用された回答
Robert Cumming
2014 年 7 月 21 日
You have answered your own question - your data type is a int16. A NaN is a double
See:
class(NaN)
It is type double.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で NaNs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!