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 Fri 22-May-2009 15:13:00 by m2html © 2003