Home > Objects > @iData > sum.m

iFit/sum

PURPOSE ^

s = sum(a,dim) : computes the sum of iData objects elements

SYNOPSIS ^

function [s,sigma] = sum(a,dim)

DESCRIPTION ^

 s = sum(a,dim) : computes the sum of iData objects elements

   @iData/sum function to compute the sum of the elements of the data set
     sum(a,dim) accumulates along axis of rank dim. The axis is then removed.
       If dim=0, sum is done on all axes and the total is returned as a scalar value. 
         In this case, a second output argument holds the error bar.
       If dim='radial', the sum is done radially (R=sqrt(sum(axes^2)).
       sum(a,1) accumulates on first dimension (columns). 
       camproj accumulates on all other axes.

 input:  a: object or array (iData/array of)
         dim: dimension to accumulate (int/array of, or 'radial')
 output: s: sum of elements (iData/scalar)
 ex:     c=sum(a);

 Version: Mar. 22, 2017
 See also iData, iData/plus, iData/prod, iData/cumsum, iData/mean,
 iData/camproj, iData/trapz, iData/cart2sph

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 22-Mar-2017 09:13:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1