# isNanInf {#isnaninf}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`isNanInf(X, [includeNull=false])`

## Arguments {#arguments}

**X** is a DOUBLE type scalar, vector or matrix.

**includeNull** is a BOOLEAN.

## Details {#details}

Check each element in *X* to see if it is a NaN/Inf value. Return a BOOLEAN type of the same length as *X*. If *includeNull* is set to true, null values will return true. The default value of *includeNull* is false.

Related function: [countNanInf](../c/countNanInf.md)

