| Statistics Toolbox | Search  Help Desk |
| nanstd | Examples See Also |
Standard deviation ignoring NaNs.
Syntax
y = nanstd(X)
Description
nanstd(X) the standard deviation treating NaNs as missing values.
For vectors, nanstd(x) is the standard deviation of the non-NaN elements of x. For matrices, nanstd(X) is a row vector containing the standard deviations of the non-NaN elements in each column of X.
Example
m = magic(3);m([1 6 8]) = [NaN NaN NaN]m =NaN 1 63 5 NaN4 NaN 2nstd = nanstd(m)nstd =0.7071 2.8284 2.8284
See Also
nanmax, nanmin, nanmean, nanmedian, nansum