Main Content
integral
Numerical integration
Description
q = integral(
specifies
additional options with one or more fun
,xmin
,xmax
,Name,Value
)Name,Value
pair
arguments. For example, specify 'WayPoints'
followed
by a vector of real or complex numbers to indicate specific points
for the integrator to use.
Examples
Input Arguments
Tips
The
integral
function attempts to satisfy:whereabs(q - Q) <= max(AbsTol,RelTol*abs(q))
q
is the computed value of the integral andQ
is the (unknown) exact value. The absolute and relative tolerances provide a way of trading off accuracy and computation time. Usually, the relative tolerance determines the accuracy of the integration. However ifabs(q)
is sufficiently small, the absolute tolerance determines the accuracy of the integration. You should generally specify both absolute and relative tolerances together.If you are specifying single-precision limits of integration, or if
fun
returns single-precision results, you might need to specify larger absolute and relative error tolerances.
References
[1] L.F. Shampine “Vectorized Adaptive Quadrature in MATLAB®,” Journal of Computational and Applied Mathematics, 211, 2008, pp.131–140.
Extended Capabilities
Version History
Introduced in R2012a