Home > freetb4matlab > statistics > nansum.m

nansum

PURPOSE ^

% Compute the sum while ignoring NaN values.

SYNOPSIS ^

function v = nansum (X, varargin)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {@var{v} =} nansum (@var{X})
% @deftypefnx{Function File} {@var{v} =} nansum (@var{X}, @var{dim})
% Compute the sum while ignoring NaN values.
%
% @code{nansum} is identical to the @code{sum} function except that NaN values are
% treated as 0 and so ignored.  If all values are NaN, the sum is 
% returned as 0.
%
% @seealso{sum, nanmin, nanmax, nanmean, nanmedian}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003