(To be removed) Find maximum value of input or sequence of inputs
The dsp.Maximum
object finds the maximum values of an
input or sequence of inputs.
The dsp.Maximum
System
object™ will be removed in a future release. To compute the maximum, use the max
function. To compute the running maximum in MATLAB®, use the dsp.MovingMaximum
object. For more information,
see Compatibility Considerations.
To compute the maximum value of an input or sequence of inputs:
Create the dsp.Maximum
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,
max
= dsp.Maximummax
, that computes the value and index of the maximum elements in
an input or a sequence of inputs along the specified Dimension.
returns a maximum-finding object, max
= dsp.Maximum(Name,Value
)max
, 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)
.
Find a maximum value and its index.
max1 = dsp.Maximum; x = randn(100,1); [y,I] = max1(x)
y = 3.5784
I = 9
Compute a running maximum.
max2 = dsp.Maximum; max2.RunningMaximum = true; x = randn(100,1); z = max2(x); plot(z)
z(i) is the maximum of all values in the vector x(1:i).
This object implements the algorithm, inputs, and outputs described on the Maximum block reference page. The object properties correspond to the block parameters.