Contenido principal

Moving Minimum

R2026b

Moving minimum

  • Moving Minimum block

Libraries:
DSP System Toolbox / Statistics

Description

The Moving Minimum block determines the moving minimum of the input signal along each channel independently over time. The block uses the sliding window method to determine the moving minimum. In this method, a window of specified length moves over each channel sample by sample, and the block determines the minimum 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

expand all

Data over which the block determines the moving minimum using the sliding window method. The block accepts real-valued or complex-valued multichannel inputs, that is, m-by-n size inputs, where m ≥ 1 and n ≥ 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.

This port is unnamed until you enable the WL input port.

Data Types: single | double
Complex Number Support: Yes

Since R2026b

Specify the tunable window length as a positive integer. The block uses this value as the sliding window length for computing the moving minimum.

When you select Auto-adjust invalid window length, the block adjusts invalid window length values from the input port and issues a warning. For more information on what values are invalid, see the Auto-adjust invalid window length parameter description.

When you clear the Auto-adjust invalid window length parameter, the block throws an error for invalid window length values.

Dependencies

To enable this port, select Specify window length, Make window length tunable, and Specify window length from input port.

Data Types: single | double

Output

expand all

Moving minimum 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 minimum of the data in the window. For more details, see Algorithms.

Data Types: single | double
Complex Number Support: Yes

Parameters

expand all

Select this parameter to specify a finite window length. When you clear this parameter, the length of the sliding window is infinite. In this mode, the block determines the minimum of the current sample and all the previous samples in the channel.

Since R2026b

Select this parameter to make the window length tunable, that is, you can change the window length during simulation through the block dialog box by updating the Window length parameter or through the input port WL by selecting the Specify window length from input port parameter.

When you clear this parameter, the window length is fixed and you cannot change it during simulation. Specify the window length through the Window length parameter.

Dependencies

To enable this parameter, select Specify window length.

Since R2026b

When you select this parameter, the block reads the tunable window length from the input port, WL. When you clear this parameter, the block reads the tunable window length from the Window length parameter.

Dependencies

To enable this parameter, select Specify window length and Make window length tunable.

Specify the length of the sliding window in samples as a positive integer.

When you select the Make window length tunable parameter, the window length you specify is tunable and must be less than or equal to the value you specify in the Maximum window length parameter. When you clear the Make window length tunable parameter, the window length is fixed. (since R2026b)

Dependencies

To enable this parameter, select Specify window length. In addition, if you select Make window length tunable, you must clear the Specify window length from input port parameter.

Since R2026b

Specify the maximum value of the tunable window length as a positive integer. The window length you specify during simulation cannot exceed this value.

Dependencies

To enable this parameter, select Specify window length and Make window length tunable.

Since R2026b

When you select this parameter, the block adjusts invalid window length values from the input port and issues a warning.

  • If the tunable window length value is greater than Maximum window length, the block uses Maximum window length.

  • If the tunable window length value is less than 1, the block uses 1.

  • If the tunable window length value is not an integer, the block uses the floored value.

When you clear this parameter, the block throws an error for invalid window length values.

Dependencies

To enable this parameter, select Specify window length, Make window length tunable, and Specify window length from input port.

Specify the type of simulation to run. You can set this parameter to:

  • Interpreted execution — Simulate model using the MATLAB® interpreter. This option shortens startup time.

  • 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 subsequent simulations.

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

expand all

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

Version History

Introduced in R2016b

expand all