You are looking for :
unique(cummin(myList))
EDIT some explanation:
the min of the subset x[1:n - 1] for each n of list is the cumulative minima of
the list. Since cummin
is vectorized , the result have the same size of the input list, so we need unique
to remove deplicated.
The same solution can be generalized for :
- cumulative maxima :
cummax
- cumulative sum :
cumsum
- cumulative product :
cumprod