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, andcalendarDurationNaT—datetime<missing>—string<undefined>—categorical{''}—cellof 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,
anymissingreturnsfalse. To determine if any element of a structure array is missing, applyanymissingto each field in the structure by using thestructfunfunction. To determine if any element of a cell array of non-character vectors is missing, applyanymissingto each cell in the cell array by using thecellfunfunction.
Extended Capabilities
Version History
Introduced in R2022aSee Also
Functions
any|missing|ismissing|rmmissing|fillmissing|fillmissing2|standardizeMissing