timeseries.filter
timeseries: ts = filter (ts, b, a)
timeseries: ts = filter (ts, b, a, ind)
Filter a series.
ts = filter (ts, b, a) runs each column
of the data through the filter of numerator coefficients b and
denominator coefficients a, as filter (b, a,
x) does, along time from a zero initial state. NaN
values are first filled by the interpolation method of the series, so
the data must not begin or end with one. Every other property is
kept.
ts = filter (ts, b, a, ind)
filters only the columns ind of the data, or its rows where
IsTimeFirst is false.
The data must be double or single, and the times
uniformly spaced. MATLAB filters data of three dimensions across its
rows when ind is not given, and filters a series with irregular
times as if they were uniform, though its documentation requires them
to be.
See also: timeseries.idealfilter, timeseries.detrend
Source Code: timeseries
filter applies a digital filter along time, here a three-point moving average. The times must be uniform.
ts = timeseries ([3; 6; 9; 12; 9; 6; 3], 0:6); s = filter (ts, ones (1, 3) / 3, 1); [s.Time, s.Data]
ans =
0 1
1 3
2 6
3 9
4 10
5 9
6 6