| MATLAB Function Reference | ![]() |
Detect finite elements of an array
Syntax
Description
TF = isfinite(A)
returns an array the same size as A containing logical true (1) where the elements of the array A are finite and logical false (0) where they are infinite or NaN.
For any A, exactly one of the three quantities isfinite(A), isinf(A), and isnan(A) is equal to one.
Examples
a = [-2 -1 0 1 2]; isfinite(1./a) Warning: Divide by zero. ans = 1 1 0 1 1 isfinite(0./a) Warning: Divide by zero. ans = 1 1 0 1 1
See Also
| isfield | isglobal | ![]() |