duration.cummax
duration: M = cummax (D)
duration: M = cummax (D, dim)
duration: M = cummax (D, vecdim)
duration: M = cummax (D, 'all')
duration: M = cummax ([], nanflag)
duration: M = cummax ([], direction)
duration: [M, index] = cummax (…)
duration: [M, index] = cummax (…, 'linear')
duration: … = cummax (…, 'ComparisonMethod', method)
Return the cumulative maximum values in duration arrays.
This method overloads the core cummax function for duration
arrays. The functionality is identical to core cummax function.
Type help cummax for more information.
Source Code: duration
cummax returns the running maximum — each element is the largest duration seen so far.
d = hours ([2, 4, 3, 7, 5])
d =
1x5 duration array
2 hr 4 hr 3 hr 7 hr 5 hr
cummax (d)
ans =
1x5 duration array
2 hr 4 hr 4 hr 7 hr 7 hr