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 Comments

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

Sign in to comment.

 Accepted Answer

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.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!