Moving Maximum
R2026bMoving maximum
Libraries:
DSP System Toolbox /
Statistics
Description
The Moving Maximum block determines the moving maximum of the input signal along each channel independently over time. The block uses the sliding window method to determine the moving maximum. In this method, a window of specified length moves over each channel sample by sample, and the block determines the maximum over the data in the window.
You can change the window length during simulation by selecting the Make window length tunable parameter. Specify the tunable window length from the block dialog box by updating the Window length parameter. Alternatively, specify it through the input port WL by selecting the Specify window length from input port parameter. For more details, see Algorithms. (since R2026b)
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"dspstat3/Moving Maximum"
Example: add_block("dspstat3/Moving Maximum","myModel/myBlock",MakeNameUnique="on")
Algorithms
Extended Capabilities
Version History
Introduced in R2016bSee Also
Blocks
- Maximum | Moving Minimum | Moving Average | Moving RMS | Moving Standard Deviation | Moving Variance | Median Filter
![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)