This MATLAB function computes an approximation of the cumulative integral of Y via the trapezoidal method with unit spacing.
www.mathworks.com