std
Returns the standard deviation of x.
Syntax
s=std(x)
s=std(x,scale)
s=std(x,scale,dim)
Inputs
- x
- Data sample.
- scale
- Scale option.
- dim
- Dimension on which to perform the calculation.
Outputs
- s
- Standard deviation.
Examples
x=[9.3, 10.6, 11.9, 13.3, 15.1, 18.2];
s=std(x)
s = 3.2303
x=[9.3, 4.8; 10.6, 6.6; 11.9, 8.0; 13.3, 9.3; 15.1, 10.6; 18.2, 11.9];
s=std(x)
s = [Matrix] 1 x 2
3.2303 2.6136
Comments
std (x) = sqrt(SUM(x(i) - mean(x))^2 / (n-1))
This is the definition for scale=0.