# isnan

Check whether symbolic array elements are `NaN`s

## Description

example

````isnan(A)` returns an array of the same size as `A` containing logical `1`s (true) where the elements of `A` are symbolic `NaN`s, and logical `0`s (false) where they are not.```

## Examples

### Determine Which Elements of Symbolic Array Are `NaN`s

Using `isnan`, determine which elements of this symbolic matrix are `NaN`s:

`isnan(sym([pi NaN Inf; 1 + i Inf + i NaN + i]))`
```ans = 0 1 0 0 0 1```

## Input Arguments

collapse all

### `A` — Input valuesymbolic number | symbolic variable | symbolic expression | symbolic function | symbolic array | symbolic vector | symbolic matrix

Input value, specified as a symbolic number, variable, expression, or function, or as an array, vector, or matrix of symbolic numbers, variables, expressions, functions.

collapse all

### Tips

• For any `A`, exactly one of the three quantities `isfinite(A)`, `isinf(A)`, or `isnan(A)` is `1` for each element.

• Symbolic expressions and functions containing `NaN` evaluate to `NaN`. For example, `sym(NaN + i)` returns symbolic `NaN`.