# isinf

## Purpose

Detect infinities.

## Synopsis

    k = isinf(X)

## Description

`isinf(X)` returns 1 where the elements of `X` are `+Inf` or `-Inf` and 0 where they are not.

## Examples

    A = [pi  NaN  Inf  -Inf]

    A =
        3.1416    NaN    Inf    -Inf

    isinf(A)

    ans =
        0    0    1    1

    any(isinf(A))

    ans =
        1

## See Also

    finite, isnan

(c) Copyright 1994 by The MathWorks, Inc.