s = trapz(a,dim) : computes the integral of iData objects elements along given dimension @iData/trapz function to compute the integral of the data set along a given dimension trapz(a,dim) integrates along axis of rank dim. The axis is then removed. default is to use dim=1. If dim=0, integration 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 integration is done radially (R=sqrt(sum(axes^2)). trapz is complementary to sum and camproj, but takes into account axes. trapz(a,'radial', center) specifies the 'center' of the integration (vector of coordinates) or a single value used as center on all axes (for instance 0). All axes are assumed to be distances. input: a: object or array (iData/array of) dim: dimension to integrate (int/array of, or 'radial') output: s: integral of elements (iData/scalar) ex: c=trapz(a); Version: Aug. 22, 2017 See also iData, iData/cumsum, iData/camproj, iData/sum