Function Reference
— Function File: z = trapz (y)
— Function File: z = trapz (x, y)
— Function File: z = trapz (..., dim)

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

See also: cumtrapz