Function Reference: standardizeMissing

statistics: B = standardizeMissing (A, indicator)

Replace data values specified by indicator in A by the standard ’missing’ data value for that data type.

A can be a numeric scalar or array, a character vector or array, or a cell array of character vectors (a.k.a. string cells).

indicator can be a scalar or an array containing values to be replaced by the ’missing’ value for the class of A, and should have a data type matching A.

’missing’ values are defined as :

  • NaN: single, double
  • " " (white space): char
  • {""} (empty string in cell): string cells.

Compatibility Notes:

  • Octave’s implementation of standardizeMissing does not restrict indicator of type char to row vectors.
  • All numerical and logical inputs for A and indicator may be specified in any combination. The output will be the same class as A, with the indicator converted to that data type for comparison. Only single and double have defined ’missing’ values, so A of other data types will always output B = A.

See also: fillmissing, ismissing, rmmissing

Source Code: standardizeMissing