The value used to represent NaN in numeric data.
NAVALUE
A real number.
{1, 2, navalue, 3, 4}
generates a series with the third element as an NaN.
READTABLE will read the strings NA, NAN or NULL as NAVALUES.
NAVALUEs are skipped when plotted. The graph of {1,2,navalue,3,4} displays a gap between the 2nd and 4th data points.
NAVALUE is equivalent to NAN.
The NA_COMPARE_MODE configuration parameter determines the behavior of comparison operations with nan values:
Operation
|
Mode 0 |
Mode 1 |
Mode 2 |
|
Standard |
IEEE 754 |
Modified IEEE 754 |
nan + val |
nan |
nan |
nan |
nan > val |
nan |
0 |
0 |
nan == nan |
1 |
0 |
1 |
nan >= nan |
nan |
0 |
1 |
nan != nan |
0 |
1 |
0 |
For example:
a = {1, 2, nan, 3};
/* Default Mode */
setconf("na_compare_mode", "0");
b = a >= a;
/* IEEE 754 Mode */
setconf("na_compare_mode", "1");
c = a >= a;
/* Modified IEEE 754 Mode */
setconf("na_compare_mode", "2");
d = a >= a;
b == {1, 1, nan, 1};
c == {1, 1, 0, 1};
d == {1, 1, 1, 1};