This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

dsp.MovingMinimum System object

Moving minimum


The dsp.MovingMinimum System object™ determines the moving minimum of the input signal along each channel, independently over time. The object uses the sliding window method to determine the moving minimum. In this method, a window of specified length is moved over each channel, sample by sample, and the object determines the minimum of the data in the window. For more details, see Algorithms.

The object accepts multichannel inputs, that is, m-by-n size inputs, where m ≥ 1, and n > 1. The object also accepts variable-size inputs. Once the object is locked, you can change the size of each input channel. However, the number of channels cannot change. This object supports C and C++ code generation.

To determine the moving minimum of the input:

  1. Create a dsp.MovingMinimum object and set the properties of the object.

  2. Call step to compute the moving minimum.


Alternatively, instead of using the step method to perform the operation defined by the System object, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.


movMin = dsp.MovingMinimum returns a moving minimum object, movMin, using the default properties.

movMin = dsp.MovingMinimum(Len) sets the WindowLength property to Len.

movMin = dsp.MovingMinimum(Name,Value) specifies additional properties using Name,Value pairs. Unspecified properties have default values.


movMin = dsp.MovingMinimum('SpecifyWindowLength',1,'WindowLength',10);


expand all

Flag to specify a window length, specified as a scalar boolean.

  • true — The length of the sliding window is equal to the value you specify in the WindowLength property.

  • false — The length of the sliding window is infinite. In this mode, the object determines the minimum of the current sample and all the past samples.

Length of the sliding window, specified as a positive scalar integer. This property applies when you set SpecifyWindowLength to true.


resetReset internal states of System object
stepMoving minimum of input signal
Common to All System Objects

Create System object with same property values


Expected number of inputs to a System object


Expected number of outputs of a System object


Check locked states of a System object (logical)


Allow System object property value changes


expand all

Compute the moving minimum of a sum of three sine waves with varying amplitude. Use a sliding window of length 30.


Set up an input signal that is a sum of three sine waves with frequences at 2 Hz, 5 Hz, and 10 Hz. The sampling frequency is 100 Hz. Create a dsp.MovingMinimum object with a window length of 30. Create a time scope for viewing the output.

sin = dsp.SineWave('SampleRate',100,...
    'Frequency',[2 5 10],...
movMin = dsp.MovingMinimum(30);
scope  = dsp.TimeScope('SampleRate',100,...
    'YLimits',[-4.5 4.5]);

Compute the Moving Minimum

Each sine wave component of the input signal has a different amplitude that varies with the iteration. Use the movMin object to determine the minimum value of the current sample and the past 29 samples of the input signal.

for index = 1:100
    sin.Amplitude = rand(1,3);
    x = sum(sin(),2);
    xmin = movMin(x);


expand all


[1] Bodenham, Dean. “Adaptive Filtering and Change Detection for Streaming Data.” PH.D. Thesis. Imperial College, London, 2012.

Extended Capabilities

Introduced in R2016b

Was this topic helpful?