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 个评论

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

请先登录,再进行评论。

 采纳的回答

Andreas Goser
Andreas Goser 2013-3-5
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.

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by