Funny bug with respect to NaN value,

declare X as
X = [1 2 3 4 NaN];
and then use,
max(X) yields, 4
min(X) yields, 1
but in workspace the Min and Max column displays NaN and NaN,
[PS : I agree that NaN values are always ignored.]
Is this a required feature or a bug ?

2 comentarios

Jan
Jan el 4 de Mzo. de 2013
What exactly is "in workspace"? Do you mean the workspace browser? If so, which Matlab version are you using?
Anil
Anil el 5 de Mzo. de 2013
Its the workspace window or browser of Matlab, I noticed it in both R2007b and R2012a

Iniciar sesión para comentar.

 Respuesta aceptada

Andreas Goser
Andreas Goser el 5 de Mzo. de 2013

1 voto

This is an intended feature in the workspace browser in MATLAB 7.9 (R2009b). The Min and Max values in the workspace browser do not ignore NaN by default. You can make the workspace browser ignore NaN by changing the settings under Preferences->Workspace.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 4 de Mzo. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by