nanstd
(Not recommended) Standard deviation, ignoring NaN
      values
nanstd is not recommended. Use the MATLAB® function std instead. With the std function, you can specify whether
      to include or omit NaN values for the calculation. For more information,
      see Version History.
Syntax
Description
y = nanstd(X)std of X, computed after
        removing all NaN values.
- If - Xis a vector, then- nanstd(X)is the sample standard deviation of all the non-- NaNelements of- X.
- If - Xis a matrix, then- nanstd(X)is a row vector of column sample standard deviations, computed after removing- NaNvalues.
- If - Xis a multidimensional array, then- nanstdoperates along the first nonsingleton dimension of- X. The size of this dimension becomes 1 while the sizes of all other dimensions remain the same.- nanstdremoves all- NaNvalues.
- By default, - nanstdnormalizes- yby n – 1, where n is the number of remaining observations after removing observations with- NaNvalues.
y = nanstd(X,flag,vecdim)vecdim. The function computes the standard deviations after removing
          NaN values. For example, if X is a matrix, then
          nanstd(X,0,[1 2]) is the sample standard deviation of all
          non-NaN elements of X because every element of a
        matrix is contained in the array slice defined by dimensions 1 and 2.
