isequalwithequalnans
Tests array equality with NaN equal to NaN (older name of isequaln).
Category: Language Fundamentals > Operators and Elementary Operations
Syntax
tf = isequalwithequalnans(A, B)
Same as isequaln(A, B).
tf = isequalwithequalnans(A, B, ...)
Compares several arrays.
Description
This is the original name of isequaln. Two arrays are equal when they have the same size and equal elements, and NaN values at matching positions count as equal.
New code should call isequaln, which does the same thing and is the supported name.
Input arguments
A, B, ...- Values of any type.
Output arguments
tf- A single logical scalar.
Example
isequalwithequalnans([1 NaN 3], [1 NaN 3])
isequal([1 NaN 3], [1 NaN 3])
Output
ans = logical
1
ans = logical
0
Notes
The name is kept only for compatibility; MATLAB recommends isequaln.