% -*- texinfo -*- % @deftypefn {Function File} {@var{v} =} nanstd (@var{X}) % @deftypefnx{Function File} {@var{v} =} nanstd (@var{X}, @var{opt}) % @deftypefnx{Function File} {@var{v} =} nanstd (@var{X}, @var{opt}, @var{dim}) % Compute the standard deviation while ignoring NaN values. % % @code{nanstd} is identical to the @code{std} function except that NaN values are % ignored. If all values are NaN, the standard deviation is returned as NaN. % If there is only a single non-NaN value, the deviation is returned as 0. % % The argument @var{opt} determines the type of normalization to use. Valid values % are % % @table @asis % @item 0: % normalizes with @math{N-1}, provides the square root of best unbiased estimator of % the variance [default] % @item 1: % normalizes with @math{N}, this provides the square root of the second moment around % the mean % @end table % % The third argument @var{dim} determines the dimension along which the standard % deviation is calculated. % % @seealso{std, nanmin, nanmax, nansum, nanmedian, nanmean} % @end deftypefn