FUNCTION REFERENCE
movmean
Moving mean.
Moving mean.
Syntax
M = movmean(A, k)Syntax
M = movmean(A, [kb kf])Syntax
M = movmean(A, k, dim, nanflag, 'Endpoints', e)Each element is the mean of a window along dim (default: the first
non-singleton dimension). An odd k is centred; an even k takes k/2 elements
before and k/2-1 after. [kb kf] takes kb before and kf after. nanflag is
'includenan' (default, any NaN in the window gives NaN) or 'omitnan'.
'Endpoints' is 'shrink' (default: windows are cut at the ends), 'discard'
(only full windows are returned), 'fill' (pad missing samples with NaN)
or a numeric value to pad missing samples before reduction. 'omitnan'
ignores NaN padding as well as NaN samples.
Example
movmean([1 2 3 4 5], 3) % [1.5 2 3 4 4.5]Differences from MATLAB: k must be an integer; 'SamplePoints', dim 3 or
higher, and complex input are not supported yet and stop with an error.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.