Skip to content

equalwithequalnans

Element-wise equality with NaN treated as equal to NaN.

C = equalwithequalnans(A, B)

Like eq but returns true at positions where both elements are NaN. The element-level companion of isequalwithequalnans.

equalwithequalnans([1 NaN 3], [1 NaN 3]) % [1 1 1]
  • eq — Element-wise equality test (function form of ==).
  • isequalwithequalnans — Like isequal, but treats NaNs as equal to other NaNs.