isinf
Array elements that are infinite
Syntax
TF = isinf(A)
Description
TF = isinf(A)
returns an array the same size asA
containing logical 1 (true
) where the elements ofA
are+Inf
or-Inf
and logical 0 (false
) where they are not. For a complex numberz
,isinf(z)
returns1
if either the real or imaginary part ofz
is infinite, and0
if both the real and imaginary parts are finite orNaN
.
For any realA
, exactly one of the three quantitiesisfinite(A)
,isinf(A)
, andisnan(A)
is equal to one.
Examples
Extended Capabilities
Introduced before R2006a
Was this topic helpful?