QUAD

 

 Numerical evaluation of an 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.  '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 = QUAD(F,a,b,tol) integrates to a relative error of tol.

  Q = Inf is returned if an excessive recursion level is reached,

  indicating a possibly singular integral.

  Q = QUAD(F,a,b,tol,trace) integrates to a relative error of tol and

  traces the function evaluations with a point plot of the integrand.

 

 

  QUAD uses an adaptive recursive Simpson's rule.

 

 

  See also QUAD8HSRNMC.