Numerically evaluate integral using adaptive Simpson's rule.
quadv (
f,
a,
b)
approximates the integral of f(
x)
to the default absolute tolerance of1e-6
. f is either a function handle, inline function or string containing the name of the function to evaluate. The function f must accept a string, and can return a vector representing the approximation to n different sub-functions.If defined, tol defines the absolute tolerance to which to which to integrate each sub-interval of f
(
x)
. While if trace is defined, displays the left end point of the current interval, the interval length, and the partial integral.Additional arguments p1, etc, are passed directly to f. To use default values for tol and trace, one may pass empty matrices.