__quadcc__
- :
q =__quadcc__(f, a, b)¶ - :
q =__quadcc__(f, a, b, tol)¶ - :
q =__quadcc__(f, a, b, tol, sing)¶ - :
[q, err, nr_points] =__quadcc__(…)¶ Integrate the real function f over the interval from a to b with a globally adaptive Gauss-Kronrod scheme.
f is a function handle or the name of a function. It is called with a column vector of abscissae and must return a real array with the same number of elements, so it has to be written in vectorised form.
a and b are real scalars and may be infinite. If b is smaller than a the integral changes sign.
tol is either an absolute tolerance, or a two element vector
[abstol, reltol]. The defaults are1e-10and1e-6. The request is met when the error estimate is belowmax (abstol, reltol * abs (q)).sing is a vector of points inside
(a, b)at which the integrand has a singularity or a kink; the integration is split there.The outputs are the integral q, an estimate of its absolute error err (
Infif the tolerance could not be met) and the number of integrand evaluations nr_points. When both limits are single precision the results are single precision.