Home > freetb4matlab > integration > quadg.m

quadg

PURPOSE ^

SYNOPSIS ^

function int = quadg(fun,xlow,xhigh,tol,trace,p1,p2,p3,p4,p5,p6,p7,p8,p9)

DESCRIPTION ^

error:  int = quadg('Fun',xlow,xhigh)
or
        int = quadg('Fun',xlow,xhigh,tol)
or
        int = quadg('Fun',xlow,xhigh,tol,trace,p1,p2,....)

This function works just like QUAD or QUAD8 but uses a Gaussian quadrature
integration scheme.  Use this routine instead of QUAD or QUAD8:
    if higher accuracy is desired (this works best if the function, 
        'Fun', can be approximated by a power series) 
    or if many similar integrations are going to be done (I think less
        function evaluations will typically be done, but the 
        integration points and the weights must be calculated.
        These are saved between integrations so when QUADG
        is called again, the points and weights are all ready
        known.)
    or if the function evaluations are time consuming.
Note that if there are discontinuities the integral should be broken up into separate 
pieces.  And if there are singularities,  a more appropriate integration quadrature
should be used (such as the Gauss-Chebyshev).

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003