Main Content

Moving Maximum

移动的最大

  • 库:
  • DSP System Toolbox / Statistics

  • Moving Maximum block

Description

TheMoving Maximumblock 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. For more details, seeAlgorithms.

Ports

Input

expand all

Data over which the moving maximum is determined using the sliding window method. The block accepts real-valued or complex-valued multichannel inputs, that is,m-by-nsize inputs, wherem≥ 1 andn≥ 1. The block also accepts variable-size inputs. During simulation, you can change the size of each input channel. However, the number of channels cannot change.

Data Types:single|double
Complex Number Support:Yes

Output

expand all

移动的最大output, determined using the sliding window method. The size of the output matches the size of the input. The window slides column-wise along each channel, and the block determines the maximum of the data in the window. For more details, seeAlgorithms.

Data Types:single|double
Complex Number Support:Yes

Parameters

expand all

When you select this check box, the length of the sliding window is equal to the value you specify through theWindow lengthparameter. When you clear this check box, the length of the sliding window is infinite. In this mode, the block determines the maximum of the current sample and all previous samples in the channel.

Window lengthspecifies the length of the sliding window in samples.

Dependencies

This parameter appears when you select theSpecify window lengthcheck box.

Specify the type of simulation to run as one of the following:

  • Code generation–– Simulate model using generated C code. The first time you run a simulation, Simulink®generates C code for the block. The C code is reused for subsequent simulations, as long as the model does not change. This option requires additional startup time but provides faster simulation speed thanInterpreted execution.

  • Interpreted execution–– Simulate model using the MATLAB®interpreter. This option shortens startup time but has slower simulation speed thanCode generation.

Block Characteristics

Data Types

double|integer|single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

yes

Zero-Crossing Detection

no

Algorithms

expand all

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

版本历史

Introduced in R2016b