Computes the population standard deviation of the elements in each column of a matrix.
x (NxK matrix) – data
y (Kx1 vector) – the standard deviation of each column of x.
// Create 3 columns of random normal numbers y = rndn(8100, 3); // Calculate the standard deviation of each column std = stdsc(y);
The return, in variable std is equal to:
1.00095980 0.99488832 1.00201375
This function essentially computes:
sqrt(1/(N)*sumc((x - meanc(x)')2))
Thus, the divisor is \(N\) rather than \(N-1\), where \(N\) is the number of
elements being summed. See
stdc() for the alternate definition.