MATLAB Function Reference    
NaN

Not-a-Number

Syntax

Description

NaN returns the IEEE arithmetic representation for Not-a-Number (NaN). These result from operations which have undefined numerical results.

Examples

These operations produce NaN:

Remarks

Because two NaNs are not equal to each other, logical operations involving NaNs always return false, except ~= (not equal). Consequently,

and the NaNs in a vector are treated as different unique elements.

Use the isnan function to detect NaNs in an array.

See Also

Inf, isnan


  namelengthmax nargchk