Statistics Toolbox | ![]() ![]() |
Standard deviation of a sample
Syntax
Description
y = 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 of X
.
std
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 std
function is part of the standard MATLAB language.
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
![]() | squareform | stepwise | ![]() |