k = isinf(X)
isinf(X)
returns 1 where the elements of X
are +Inf
or -Inf
and 0 where they are not.
A = [pi NaN Inf -Inf]
A =
3.1416 NaN Inf -Inf
isinf(A)
ans =
0 0 1 1
any(isinf(A))
ans =
1
finite
,isnan
(c) Copyright 1994 by The MathWorks, Inc.