How to use "nan"

4 vues (au cours des 30 derniers jours)
gyeonggeun kim
gyeonggeun kim le 26 Mar 2021
Commenté : gyeonggeun kim le 26 Mar 2021
I want to get rid of the color by using "nan" ,marked on the map.
The code is as follows.
  2 commentaires
John D'Errico
John D'Errico le 26 Mar 2021
What does getting rid of a color mean here? Are you asking to replace those pixels with new ones that are blue, and look smoothly like the rest of the turbulent region in that area? Or do you just want to have a white area in that region, so essentially nothing plotted?
gyeonggeun kim
gyeonggeun kim le 26 Mar 2021
I want to change the pixels to blue and make them look as smooth as any other turbulent region in the area.

Connectez-vous pour commenter.

Réponses (2)

Veronica Taurino
Veronica Taurino le 26 Mar 2021
  1 commentaire
gyeonggeun kim
gyeonggeun kim le 26 Mar 2021
Thanks~

Connectez-vous pour commenter.


KSSV
KSSV le 26 Mar 2021
Modifié(e) : KSSV le 26 Mar 2021
LEt's say you want to change the values beyond a given value val (a number) into NaN. Use:
u(u>val) = NaN ;
isnan is afunction used to check whether a value is nan or not. You can check after replacing values with NaN using:
u(isnan(u))
  11 commentaires
KSSV
KSSV le 26 Mar 2021
u(u>val) = 0 ; % any number else from 0 also can be taken
gyeonggeun kim
gyeonggeun kim le 26 Mar 2021
I will try it!! thank you

Connectez-vous pour commenter.

Catégories

En savoir plus sur Graphics 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