Effacer les filtres
Effacer les filtres

replace -28672 with NaN

2 vues (au cours des 30 derniers jours)
mahesh chathuranga
mahesh chathuranga le 21 Juil 2014
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.
  1 commentaire
mahesh chathuranga
mahesh chathuranga le 21 Juil 2014
oh! thankx

Connectez-vous pour commenter.

Réponse acceptée

Robert Cumming
Robert Cumming le 21 Juil 2014
You have answered your own question - your data type is a int16. A NaN is a double
See:
class(NaN)
It is type double.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by