Fill missing values
fills
missing entries of an array or table with the constant value F = fillmissing(A,'constant',v)v.
If A is a matrix or multidimensional array, then v can
be either a scalar or a vector. When v is a vector,
each element specifies the fill value in the corresponding column
of A. If A is a table or timetable,
then v can also be a cell array.
Missing values are defined according to the data type of A:
NaN — double, single, duration,
and calendarDuration
NaT — datetime
<missing>—string
<undefined> — categorical
' ' — char
{''} — cell of
character arrays
If A is a table, then the data type of each
column defines the missing value for that column.
fills
missing entries using the method specified by F = fillmissing(A,method)method,
which can be one of the following:
'previous' — previous non-missing
value
'next' — next non-missing
value
'nearest' — nearest non-missing
value
'linear' — linear interpolation
of neighboring, non-missing values (numeric, duration,
and datetime data types only)
'spline' — piecewise cubic
spline interpolation (numeric, duration, and datetime data
types only)
'pchip' — shape-preserving
piecewise cubic spline interpolation (numeric, duration,
and datetime data types only)
specifies
additional parameters for filling missing values using one or more
name-value pair arguments. For example, you can use F = fillmissing(___,Name,Value)fillmissing(A,'linear','SamplePoints',x) to
specify a vector x for linear interpolation of
missing values.
ismissing | isnan | isnat | rmmissing | standardizeMissing