Determine which array elements are infinite
returns a
logical array containing TF
= isinf(A
)1
(true
) where the elements
of the array A
are Inf
or -Inf
, and
0
(false
) where they are not. If
A
contains complex numbers, isinf(A)
contains
1
for elements with infinite real or imaginary part, and
0
for elements where both real and imaginary parts are finite or
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.