dsp.MovingAverage
Description
The dsp.MovingAverage
System object™ computes the moving average of the input signal along each channel,
independently over time. The object uses either the sliding window method or the exponential
weighting method to compute the moving average. In the sliding window method, a window of
specified length is moved over the data, sample by sample, and the average is computed over
the data in the window. In the exponential weighting method, the object multiplies the data
samples with a set of weighting factors. The average is computed by summing the weighted data.
For more details on these methods, see Algorithms.
To compute the moving average of the input:
Create the dsp.MovingAverage object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What
Are System Objects?.
Creation
Description
movAvg = dsp.MovingAverage returns a moving
average object, movAvg, using the default properties.
movAvg = dsp.MovingAverage(Len)
sets the WindowLength property to Len.
movAvg = dsp.MovingAverage(Name,Value)
specifies additional properties using Name,Value pairs. Unspecified
properties have default values.Example:movAvg = dsp.MovingAverage('Method','Exponential
weighting','ForgettingFactor',0.9);
Properties
Unless otherwise indicated, properties are nontunable, which means you cannot change their
values after calling the object. Objects lock when you call them, and the
release function unlocks them.
If a property is tunable, you can change its value at
any time.
For more information on changing property values, see
System Design in MATLAB Using System Objects.
Method — Averaging method
'S