发布网友 发布时间:2022-04-23 03:13
共1个回答
热心网友 时间:2022-04-18 21:03
在help NaN的说明文档中有介绍关于NaN相等的问题:
Because two NaNs are not equal to each other, logical operations involving NaNs always return false, except ~= (not equal). Consequently,
NaN ~= NaN
ans =
1
NaN == NaN
ans =
0
因为任何两个NaN都是不相等的,因此涉及NaN的逻辑运算都会返回false,除了~=
Use the isnan function to detect NaNs in an array.
isnan([1 1 NaN NaN])
ans =
0 0 1 1
使用isnan来检测出数列中的NaN
object(对象)指的class(类)的实例化.老实说我没用过,一般的double型变量,char型变量都能被称之为class.
具体可以参考Matlab Class中的文档,我也迷迷糊糊,不知道lz你要有何用.