Skip to content

quadv

general · scripts/general/quadv.m

: q = quadv (f, a, b)
: q = quadv (f, a, b, tol, trace, p1, …)
: [q, nfev] = quadv (…)

Integrate the array-valued function f over [a, b] with adaptive Simpson quadrature.

f is called as f (x, p1, …) with scalar x and may return a scalar, vector or matrix, real or complex; q has the size of one such result. The error test uses the largest magnitude over all components. tol (default 1e-6) is an absolute tolerance; a nonzero trace prints the accepted subintervals. nfev is the number of function evaluations.