Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Cumulative minimum

`M = cummin(A)`

`M = cummin(A,dim)`

`M = cummin(___,direction)`

`M = cummin(___,nanflag)`

returns
the cumulative minimum elements of `M`

= cummin(`A`

)`A`

. By default, `cummin(A)`

operates
along the first array dimension whose size does not equal 1.

If

`A`

is a vector, then`cummin(A)`

returns a vector of the same size containing the cumulative minima of`A`

.If

`A`

is a matrix, then`cummin(A)`

returns a matrix of the same size containing the cumulative minima in each column of`A`

.If

`A`

is a multidimensional array, then`cummin(A)`

returns an array of the same size containing the cumulative minima along the first array dimension of`A`

whose size does not equal 1.

The

`'reverse'`

option in many cumulative functions allows quick directional calculations without requiring a flip or reflection of the input array.