nan
Array of NaN values.
Syntax
Section titled “Syntax”B = nanB = nan(n)B = nan(m, n)B = nan(…, classname)Description
Section titled “Description”Creates an array filled with NaN (Not-a-Number). Useful as a sentinel value for missing data. The optional class-name selects between 'single', 'double', and 'longdouble' representations of NaN (integer types do not have NaN).
Examples
Section titled “Examples”nan(3) % 3×3 NaNnan(2, 4, 'single') % single-precision NaN array