anymissing
Syntax
Description
returns logical TF
= anymissing(A
)1
(true
) if at least one element of
A
is missing. It returns 0
(false
) if no element is missing.
Missing values are defined according to the data type of
A
:
NaN
—double
,single
,duration
, andcalendarDuration
NaT
—datetime
<missing>
—string
<undefined>
—categorical
{''}
—cell
of character vectors
If A
is a table, then the data type of each variable defines the
missing value for that variable.
For data types with no default definition of a standard missing value,
anymissing
returns logical 0
(false
).
Examples
Input Arguments
Tips
For input data that is a structure array or a cell array of non-character vectors,
anymissing
returnsfalse
. To determine if any element of a structure array is missing, applyanymissing
to each field in the structure by using thestructfun
function. To determine if any element of a cell array of non-character vectors is missing, applyanymissing
to each cell in the cell array by using thecellfun
function.
Extended Capabilities
Version History
Introduced in R2022aSee Also
Functions
any
|missing
|ismissing
|rmmissing
|fillmissing
|fillmissing2
|standardizeMissing