How to convert to nan

6 vues (au cours des 30 derniers jours)
주희 박
주희 박 le 19 Mai 2022
Commenté : 주희 박 le 20 Mai 2022
FF= [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
And if n<10, convert n to nan. This is what i want to know
Actually I have 10614X696 double file, I can't convert it respectively.
And I want to convert it to nan in sepcific range.
Thanks.

Réponse acceptée

David Hill
David Hill le 19 Mai 2022
FF= [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
FF(FF>5&FF<14)=nan;
  1 commentaire
주희 박
주희 박 le 20 Mai 2022
Thank you so much!!

Connectez-vous pour commenter.

Plus de réponses (1)

Mathieu NOE
Mathieu NOE le 19 Mai 2022
hello
try this
FF= [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
[i,j] = find(FF > 0 & FF < 10);
FF(i,j) = NaN;
  1 commentaire
주희 박
주희 박 le 20 Mai 2022
Thank you :)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by