MATLAB Function Reference Previous page   Next Page

Detect NaN elements of array



TF = isnan(A) returns an array the same size as A containing logical true (1) where the elements of A are NaNs and logical false (0) where they are not. For a complex number z, isnan(z) returns 1 if either the real or imaginary part of z is NaN, and 0 if both the real and imaginary parts are finite or Inf.

For any real A, exactly one of the three quantities isfinite(A), isinf(A), and isnan(A) is equal to one.


See Also

isfinite, isinf, is*

Previous page  ismethod isnumeric Next page

© 1994-2005 The MathWorks, Inc.