isequalwithequalnans
Like isequal, but treats NaNs as equal to other NaNs.
Syntax
Section titled “Syntax”tf = isequalwithequalnans(A, B)tf = isequalwithequalnans(A, B, C, ...)Description
Section titled “Description”Same semantics as isequal except that NaN values are considered equal to other NaN values at corresponding positions. Useful when comparing data sets that include missing-value sentinels.
Examples
Section titled “Examples”isequalwithequalnans([1 NaN 3], [1 NaN 3]) % 1isequal([1 NaN 3], [1 NaN 3]) % 0See also
Section titled “See also”isequal— Test whether two or more inputs are equal in shape and value.