(To be removed) Median value of input
The dsp.Median
object computes the median value of the input. The object
can compute the median along each dimension (row or column) of the input or of the entire
input.
The dsp.Median
System
object™ will be removed in a future release. To compute the median, use the median
function. To compute the median in running mode (also known as moving
median), use the dsp.MedianFilter
object. For more information, see
Compatibility Considerations.
To compute the median of the input:
Create the dsp.Median
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 a median
System
object, med
= dsp.Medianmed
, that computes the median along the columns of the
input using the quick sort sorting method.
returns a median System
object, med
= dsp.Median(Name,Value
)med
, with each property set to the value you
specify.
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)
.
Compute the median value of the input column using the dsp.Median
object.
med = dsp.Median; x = [7 -9 0 -1 2 0 3 5 -9]'; y = med(x)
y = 0
This object implements the algorithm, inputs, and outputs described on the Median block reference page. The object properties correspond to the block
properties, except the Treat sample-based row input as a column block
parameter is not supported by the dsp.Median
System
object.