cummax
Cumulative maximum
Description
returns
the cumulative maximum elements of M
= cummax(A
)A
. By default, cummax(A)
operates
along the first array dimension whose size does not equal 1.
If
A
is a vector, thencummax(A)
returns a vector of the same size containing the cumulative maxima ofA
.If
A
is a matrix, thencummax(A)
returns a matrix of the same size containing the cumulative maxima in each column ofA
.If
A
is a multidimensional array, thencummax(A)
returns an array of the same size containing the cumulative maxima along the first array dimension ofA
whose size does not equal 1.
Examples
Input Arguments
Output Arguments
Tips
The
'reverse'
option in many cumulative functions allows quick directional calculations without requiring a flip or reflection of the input array.
Extended Capabilities
Version History
Introduced in R2014b