cumstd

Syntax

cumstd(X)

Arguments

X is a scalar/vector.

Details

If X is a vector, calculate the cumulative standard deviation of X. The result is a vector of the same length as X. Null values are ignored in the calculation.

If X is a matrix, conduct the aforementioned calculation within each column of X. The result is a matrix with the same shape as X.

Examples

$ x = [1,2,4,NULL,8];
$ cumstd(x);
[,0.707107,1.527525,1.527525,3.095696]

$ m=matrix(0.15 0.08 0.03 -0.14 -0.09, 0.2 -0.12 -0.16 0.08 0.16);
$ m;

#0

#1

0.15

0.2

0.08

-0.12

0.03

-0.16

-0.14

0.08

-0.09

0.16

$ cumstd(m);

#0

#1

0.049497474683058

0.226274169979695

0.060277137733417

0.19731531449265

0.123558353285671

0.169705627484771

0.119707978013163

0.16346253393362

Related functions: cummax, cummin, cumprod, cumPositiveStreak, cumsum