ismissing

Check for missing values.

Syntax

  • tf = ismissing(M)

Input argument

  • M - a variable

Output argument

  • tf - logical: result of 'ismissing'.

Description

ismissing returns a logical array which is true where elements of M are missing values.

missing data are defined as:

NaN for double or single

missing for string array

' ' for character array

'' for cell of character array

Example

A = ["Nel", NaN, "son"];
ismissing(A)
B = [1 2 NaN Inf];
ismissing(B)
C = 'Nel son'
ismissing(C)
D = {'Nel' '' 'son'}
ismissing(D)

See also

isfinite.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated