FUNCTION REFERENCE

fillmissing

Fill missing entries.

Fill missing entries.

Syntax

[F, TF] = fillmissing(A, 'constant', v)

Syntax

F = fillmissing(A, method, dim, 'EndValues', ev)

Syntax

F = fillmissing(T, method, 'DataVariables', vars)

Methods: constant, previous, next, nearest, linear (double data). Each column (or dim) is filled on its own; 'EndValues' is 'extrap' (default: the method itself, linear extrapolates), 'none', 'previous', 'next', 'nearest' or a constant. For tables a constant may give one value per variable.

Example

fillmissing([NaN 1 NaN 3], 'linear')   % [0 1 2 3]

Differences from MATLAB: No spline/pchip/makima/moving methods, SamplePoints, MaxGap or MissingLocations; 2-D arrays only.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.