Determine which array elements are NaN
returns a
logical array containing TF
= isnan(A
)1
(true
) where the elements
of A
are NaN
, and 0
(false
) where they are not. If A
contains complex
numbers, isnan(A)
contains 1
for elements with either
real or imaginary part is NaN
, and 0
for elements
where both real and imaginary parts are not NaN
.
If x
is a real scalar, exactly one of
isfinite(x)
, isinf(x)
, and
isnan(x)
returns logical 1
(true
).
For a complex scalar z
, isinf(z)
and
isnan(z)
can both return logical 1. For example,
isinf(complex(Inf,NaN))
and
isnan(complex(Inf,NaN))
both return logical 1.