This MATLAB function returns the approximate integral of Y via the trapezoidal method with unit spacing.
www.mathworks.com