Mathematics Previous page   Next Page

Numerical Integration (Quadrature)

The area beneath a section of a function F(x) can be determined by numerically integrating F(x), a process referred to as quadrature. The MATLAB quadrature functions are:

quad
Use adaptive Simpson quadrature
quadl
Use adaptive Lobatto quadrature
quadv
Vectorized quadrature
dblquad
Numerically evaluate double integral
triplequad
Numerically evaluate triple integral

To integrate the function defined by humps.m from 0 to 1, use

Both quad and quadl operate recursively. If either method detects a possible singularity, it prints a warning.

You can include a fourth argument for quad or quadl that specifies a relative error tolerance for the integration. If a nonzero fifth argument is passed to quad or quadl, the function evaluations are traced.

Two examples illustrate use of these functions:


Previous page  Troubleshooting Example: Computing the Length of a Curve Next page

© 1994-2005 The MathWorks, Inc.