FUNCTION REFERENCE

cumtrapz

Cumulative trapezoidal integral.

Cumulative trapezoidal integral.

Syntax

cumtrapz(Y)

Syntax

cumtrapz(X, Y)

Syntax

cumtrapz(Y, dim) or cumtrapz(X, Y, dim)

Returns the running integral of Y. X is a vector of sample points; without X the spacing is 1.

Example

cumtrapz([1 2 3])   % [0 1.5 4]

Differences from MATLAB: 2-D data; scalar spacing or a vector X. Complex Y works with a real vector X, where a scalar X is an error as in MATLAB; complex X is not supported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.