stdsc

Purpose

Computes the population standard deviation of the elements in each column of a matrix.

Format

y = stdsc(x)
Parameters:x (NxK matrix) – data
Returns:y (Kx1 vector) – the standard deviation of each column of x.

Examples

// 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

Remarks

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.

See also

Functions stdc(), astds(), meanc()