calculates the standard deviation.
[y,v] = nan_std(x [, opt[, DIM [, W]]])
option
normalizes with N-1 [default]
normalizes with N,
dimension
first DIMENSION, with more than 1 element
weights to compute weighted s.d. (default: [])
estimated standard deviation
features:
- provides an unbiased estimation of the S.D. - can deal with NaN's (missing values) - weighting of data - dimension argument also in Octave - compatible to Matlab and Octave
X=testmatrix('magi',3) X([1 6:9]) = %nan*ones(1,5) X = Nan 1. Nan 3. 5. Nan 4. Nan Nan y = nan_std(X) y = 0.7071068 2.8284271 Nan | ![]() | ![]() |
[1] http://mathworld.wolfram.com/StandardDeviationDistribution.html