# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# isnan

Array elements that are NaN

## Syntax

```TF = isnan(A) ```

## Description

`TF = isnan(A)` returns an array the same size as `A` containing logical 1 (`true`) where the elements of `A` are `NaN`s and logical 0 (`false`) where they are not. For a complex number `z`, `isnan(z)` returns `1` if either the real or imaginary part of `z` is `NaN`, and `0` if both the real and imaginary parts are finite or `Inf`.

For any real `A`, exactly one of the three quantities `isfinite(A)`, `isinf(A)`, and `isnan(A)` is equal to one.

## Examples

collapse all

Determine the `NaN` elements of the row vector, `A`.

`A = 0./[-2 -1 0 1 2]`
```A = 0 0 NaN 0 0 ```
`TF = isnan(A)`
```TF = 1x5 logical array 0 0 1 0 0 ```