(To be removed) Find mean value of input or sequence of inputs
The dsp.Mean
object finds the mean of an input or
sequence of inputs.
The dsp.Mean
System
object™ will be removed in a future release. To compute the mean, use the mean
function. To compute the running mean in MATLAB®, use the dsp.MovingAverage
object. For more information, see
Compatibility Considerations.
To compute the mean of an input or sequence of inputs:
Create the dsp.Mean
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? (MATLAB).
returns an object,
mn
= dsp.Meanmn
, that computes the mean of an input or a sequence of
inputs.
mn = dsp.Mean(
returns a
mean-finding object, Name,Value
)mn
, with each specified property set to the
specified value.
To use an object function, specify the
System
object as the first input argument. For
example, to release system resources of a System
object named obj
, use
this syntax:
release(obj)
Note: If you are using R2016a or an
earlier release, replace each call to the object with the equivalent step
syntax. For example, obj(x)
becomes
step(obj,x)
.
Mean
mean1 = dsp.Mean; x = randn(100,1); y = mean1(x);
Running Mean
mean2 = dsp.Mean; mean2.RunningMean = true; x = randn(100,1); yrmean = mean2(x);
This object implements the algorithm, inputs, and outputs described on the Mean block reference page. The object properties correspond to the block parameters.