categorical.ismissing
categorical: out = ismissing (C)
categorical: out = ismissing (C, indicator)
Find missing elements in categorical array.
TF = ismissing (C) returns a logical array TF
of the same size as C containing true for each
corresponding element of C that does not have a value from one of
the categories in C and false otherwise.
TF = ismissing (C, indicator) returns a logical
array TF containing true for each corresponding element of
C that matches a value in indicator and false
otherwise. The undefined elements of C are not marked, unless
indicator names them.
indicator must be a character vector, a cell vector of character
vectors, a string vector, missing, or a categorical vector.
"" nor <missing> matches the undefined
elements.
missing matches the undefined elements of C.
Source Code: categorical
For a categorical array ismissing is the same test as isundefined: the missing value is the <undefined> element. It exists so categoricals plug into the generic missing-data tools (rmmissing, standardizeMissing).
C = categorical ({'M'; ''; 'L'})
C =
3x1 categorical array
M
<undefined>
L
ismissing (C)
ans = 0 1 0