cummin

Syntax

cummin(X)

Arguments

X is a vector/matrix.

Details

If X is a vector, cumulatively calculate the minimum values in X and returns a vector of the same length as X. Null values are ignored in calculating the minimum values.

If X is a matrix, perform the calculation mentioned above along each row and returns a matrix of the same dimension as X.

Examples

$ x = [7,4,5,NULL,9]
$ cummin(x);
[7,4,4,4,4]

$ m = matrix(6 5 7 8 1, 3 9 4 2 10);
$ m;

#0

#1

6

3

5

9

7

4

8

2

1

10

$ cummin(m);

#0

#1

6

3

5

3

5

3

5

2

1

2

Related functions: cummax, cumsum, cumprod, cumPositiveStreak