m = missing()
| Parameter | Description |
|---|---|
| m | a missing value for use in arrays and tables |
An indexed assignment such as A(k) = missing or A(:) = missing keeps the class of A: missing becomes NaN in a double or single array, <missing> in a string array, NaN in a duration array and NaT in a datetime array. Arrays of the other classes (char, logical, integer, cell) have no missing value and the assignment raises an error.
Concatenation follows the same rules: [missing missing] is a 1-by-2 missing array, [missing 1] is [NaN 1], [missing []] is NaN, [missing "a"] is a string array, and concatenating missing with a char, logical, integer, cell, struct or function handle value raises an error.
A = missing()
A = double([1, 2, missing()])
B = string(["foo", missing()])
C = struct("Name", "Alice", "Age", missing())
S = strings(1, 3);
S(2:3) = missing
X = [1 2 3];
X(:) = missing
M = [missing missing]
| Version | Description |
|---|---|
| 1.15.0 | initial version |