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 Commenti

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

Accedi per commentare.

 Risposta accettata

Andreas Goser
Andreas Goser il 5 Mar 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.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by