QUAD Numerically evaluate integral, low order method. Q = QUAD('F',A,B) approximates the integral of F(X) from A to B to within a relative error of 1e-3 using an adaptive recursive Simpson's rule. 'F' is a string containing the name of the function. Function F must return a vector of output values if given a vector of input values. Q = Inf is returned if an excessive recursion level is reached, indicating a possibly singular integral. Q = QUAD('F',A,B,TOL) integrates to a relative error of TOL. Use a two element tolerance, TOL = [rel_tol abs_tol], to specify a combination of relative and absolute error. Q = QUAD('F',A,B,TOL,TRACE) integrates to a relative error of TOL and for non-zero TRACE traces the function evaluations with a point plot of the integrand. Q = QUAD('F',A,B,TOL,TRACE,P1,P2,...) allows parameters P1, P2, ... to be passed directly to function F: G = F(X,P1,P2,...). To use default values for TOL or TRACE, you may pass in the empty matrix ([]).
QUAD8 Numerically evaluate integral, higher order method. Q = QUAD8('F',A,B) approximates the integral of F(X) from A to B to within a relative error of 1e-3 using an adaptive recursive Newton Cotes 8 panel rule. 'F' is a string containing the name of the function. The function must return a vector of output values if given a vector of input values. Q = Inf is returned if an excessive recursion level is reached, indicating a possibly singular integral. Q = QUAD8('F',A,B,TOL) integrates to a relative error of TOL. Use a two element tolerance, TOL = [rel_tol abs_tol], to specify a combination of relative and absolute error. Q = QUAD8('F',A,B,TOL,TRACE) integrates to a relative error of TOL and for non-zero TRACE traces the function evaluations with a point plot of the integrand. Q = QUAD8('F',A,B,TOL,TRACE,P1,P2,...) allows coefficients P1, P2, ... to be passed directly to function F: G = F(X,P1,P2,...). To use default values for TOL or TRACE, you may pass in the empty matrix ([]).