Cumulative numerical integration using trapezoidal method.
cumtrapz (
y)
computes the cumulative integral of the y along the first non singleton dimension. If the argument x is omitted a equally spaced vector is assumed.cumtrapz (
x,
y)
evaluates the cumulative integral with respect to x.