Find missing values
TF = ismissing(
returns
a logical array that indicates which elements of an array or table
contain missing values. The size of A
)TF
is the same
as the size of A
.
Standard missing values depend on the data type:
NaN
for double
, single
, duration
,
and calendarDuration
NaT
for datetime
<missing>
for string
<undefined>
for categorical
' '
for char
{''}
for cell
of
character vectors
TF = ismissing(
treats
the values in A
,indicator
)indicator
as missing value indicators,
ignoring all default indicators listed in the previous syntax. indicator
can
be a single indicator or multiple indicators. For example, if A
is
an array of type double
, then ismissing(A,[0,-99])
treats
0 and -99 as missing double
values instead of NaN
.
Since integer variables cannot store NaN
,
use a special integer value (otherwise unused) to indicate missing
integer data, such as -99
.
For more information on finding missing strings, see Test for Empty Strings and Missing Values.
ismissing
handles leading and trailing white
space differently for indicators that are cell arrays of character
vectors, character arrays, or categorical arrays.
For cell arrays of character vectors, ismissing
does
not ignore indicator white space. All character vectors must match
exactly.
For character arrays in table variables, ismissing
ignores
trailing white space in the indicator.
For categorical arrays, ismissing
ignores
leading and trailing white space in the indicator.
Clean Missing
Data | all
| any
| fillmissing
| isempty
| isnan
| isoutlier
| isundefined
| missing
| rmmissing
| standardizeMissing