Determine which array elements are infinite
returns a logical array containingTF
= isinf(A
)1
(true
) where the elements of the arrayA
areInf
or-Inf
, and0
(false
) where they are not. IfA
contains complex numbers,isinf(A)
contains1
for elements with infinite real or imaginary part, and0
for elements where both real and imaginary parts are finite orNaN
.
Ifx
is a real scalar, exactly one ofisfinite(x)
,isinf(x)
, andisnan(x)
returns logical1
(true
).
For a complex scalarz
,isinf(z)
andisnan(z)
can both return logical 1. For example,isinf(complex(Inf,NaN))
andisnan(complex(Inf,NaN))
both return logical 1.