NaN (not a number) |
The built-in Mathcad constant NaN represents a missing or faulted value. It is particularly useful for representing missing values in datasets, since it can be an array entry that is easily distinguished from other matrix contents, and since Mathcad matrices cannot have empty placeholders. It can be inserted automatically into missing column entries by the READFILE function or the Data Import Wizard.
The value of NaN is NaN, that is, if you type NaN = it returns NaN.
NaNs are detected using the IsNaN function, since boolean comparison operations can only be used on numbers. If you redefine the variable name NaN to some other value, it is no longer a NaN, and the IsNaN function returns 0. A NaN can only be processed by functions specifically written to use it; other functions may return errors or incorrect results if passed a NaN.
NaN values are skipped in 2D graphs.