How to use "nan"
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I want to get rid of the color by using "nan" ,marked on the map.
The code is as follows.
2 comentarios
John D'Errico
el 26 de Mzo. de 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?
Respuestas (2)
KSSV
el 26 de Mzo. de 2021
Editada: KSSV
el 26 de Mzo. de 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))
Ver también
Categorías
Más información sobre NaNs en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!