nan
Abbreviation for Not A Number. If used as a built-in function returns an n x n or m x n matrix where each cell equals NaN.
Syntax
R = nan
R = nan(n)
R = nan(m,n)
Inputs
- n
- Any valid scalar | string | vector | matrix
- m
- Any valid scalar | string | vector | matrix
Outputs
- R
- nan array.
Example
Common NaN return:
R = 0/0
R = NaN
R = Inf/Inf
R = 0 * Inf
R = NaN
Comments
ee IEEE 754 floating-point standard.
Two NaN values cannot be commpared by == operator or isequal function. To compare NaN, isnan function is required.