dsp.MovingMaximum
R2026bMoving maximum
Description
The dsp.MovingMaximum
System object™ determines the moving maximum of the input signal along each channel,
independently over time. The object uses the sliding window method to determine the moving
maximum. In this method, a window of specified length is moved over each channel, sample by
sample, and the object determines the maximum of the data in the window.
You can make the window length tunable by setting
the EnableTunableWindowLength property to true. In
this mode, use the TunableWindowLength property to change the window
length even after you pass some data to the object and the object is locked. The
MaxWindowLength property specifies the maximum allowed window length.
For more details, see Algorithms. (since R2026b)
The dsp.MovingMaximum object and the movmax function both compute the moving maximum of the input signal. However,
the object can process large streams of real-time data and handle system states automatically.
The function performs one-time computations on data that is readily available and cannot
handle system states. For a comparison between the two, see System Objects vs MATLAB Functions.
To determine the moving maximum of the input:
Create the
dsp.MovingMaximumobject 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
Syntax
Description
returns a moving
maximum object, movMax = dsp.MovingMaximummovMax, using the default properties.
sets the movMax = dsp.MovingMaximum(Len)WindowLength property to Len.
sets properties using one or more name-value arguments. For example, to enable tunable
window length, set movMax = dsp.MovingMaximum(PropertyName=Value)EnableTunableWindowLength to
true and to specify a maximum window length of 30, set
MaxWindowLength to 30.
Properties
Usage
Syntax
Description
Input Arguments
Output Arguments
Object Functions
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)
Examples
Algorithms
References
[1] Bodenham, Dean. “Adaptive Filtering and Change Detection for Streaming Data.” PH.D. Thesis. Imperial College, London, 2012.
Extended Capabilities
Version History
Introduced in R2016bSee Also
Functions
Objects
dsp.MovingMinimum|dsp.MovingAverage|dsp.MovingRMS|dsp.MovingStandardDeviation|dsp.MovingVariance|dsp.MedianFilter|powermeter


![Sliding window method for moving maximum with window length 4 and input samples [−1, −2, 3, 2, 5, 2]. At each time step n=0 through n=5, the window expands until length 4 is reached, then moves along the data. Moving maximum computes max for each window position, producing values −1, −1, 3, 3, 5, 5 at n=5](movmax_slidewin.png)