| Statistics Toolbox | Search  Help Desk |
| std | Examples See Also |
Standard deviation of a sample.
Syntax
y = std(X)
Description
std(X) computes the sample standard deviation of the data in X. For vectors, std(x) is the standard deviation of the elements in x. For matrices, std(X) is a row vector containing the standard deviation of each column ofX.
std(X) normalizes by n-1 where n is the sequence length. For normally distributed data, the square of the standard deviation is the minimum variance unbiased estimator of
2 (the second parameter).
The standard deviation is
.
Examples
In each column, the expected value of y is one.x = normrnd(0,1,100,6);
y = std(x)
y =
0.9536 1.0628 1.0860 0.9927 0.9605 1.0254
y = std(-1:2:1)
y =
1.4142
See Also
cov,varstd is a function in MATLAB.