| Mathematics | ![]() |
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:
|
Use adaptive Simpson quadrature |
|
Use adaptive Lobatto quadrature |
|
Vectorized quadrature |
|
Numerically evaluate double integral |
|
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:
| Troubleshooting | Example: Computing the Length of a Curve | ![]() |
© 1994-2005 The MathWorks, Inc.