Variance of input or sequence of inputs
The Variance
object computes variance for an
input or sequence of inputs.
To compute the variance of an input or sequence of inputs:
Define and set up your variance System object™. See Construction.
Call step
to compute the variance according to
the properties of dsp.Variance
. The behavior of step
is
specific to each object in the toolbox.
Starting in R2016b, instead of using the step
method
to perform the operation defined by the System
object, you can
call the object with arguments, as if it were a function. For example, y
= step(obj,x)
and y = obj(x)
perform
equivalent operations.
The Running
mode in the dsp.Variance
System
object will
be removed in a future release. To compute the running variance in MATLAB^{®},
use the dsp.MovingVariance
System
object instead.
var = dsp.Variance
returns
a variance System
object, var
, that computes
the variance of an input or a sequence of inputs over the specified Dimension
.
var = dsp.Variance('
returns
a variance System
object, PropertyName
',PropertyValue
,...)var
, with each specified
property set to the specified value.

Enable calculation over time Set this property to 

Enable reset input port Set this property to 

Reset condition for running variance mode Specify which event resets the running variance as one of  

Dimension to operate along Specify how the object performs the variance calculation over the data as one of 


Numerical dimension to operate along Specify the input signal dimension (onebased value) the object uses to compute variance. The
cannot exceed the number of dimensions in the input signal. This property applies when you set
the Dimension property to 
reset  Reset variance to zero 
step  Variance of input 
Common to All System Objects  

clone  Create System object with same property values 
getNumInputs  Expected number of inputs to a System object 
getNumOutputs  Expected number of outputs of a System object 
isLocked  Check locked states of a System object (logical) 
release  Allow System object property value changes 
This object implements the algorithm, inputs, and outputs described on the Variance block reference page. The object properties correspond to the block parameters, except:
Reset port block parameter corresponds
to both the ResetCondition
and the ResetInputPort
object
properties.