No BSD License  

Highlights from
quadg/quad2dg

4.25

4.2 | 4 ratings Rate this file 10 Downloads (last 30 days) File Size: 7.15 KB File ID: #33

quadg/quad2dg

by Per A. Brodtkorb

 

17 Feb 1999 (Updated 03 Jan 2005)

Modified versions of the quadg.m and quad2dg.m from the NIT (Numerical Integration Toolbox)

| Watch this File

File Information
Description

These functions are modified versions of the quadg.m and quad2dg.m files found in the NIT (Numerical Integration Toolbox)
 
The code has been vectorized in order to be able to perform fast integration of several integration limits. As before quadg and quad2dg only calculate one and two dimensional integrals, respectively, but you may specify several integration limits in a single call to the functions. It is also possible to integrate directly given functions enclosed in parenthesis
 
Example: integration from 0 to 2 and from 2 to 4 for x is done in a single call by:
 
>>quadg('(x.^2)',[0 2],[2 4])
 
ans=
 
2.6667 18.6667
 
similarly integration from 0 to 2 and from 2 to 4 for both x and y is done in a single call by:
 
quad2dg('(x.^2.*y)',[0 2],[2 4],[0 2],[2 4])
 
ans=
 5.3333 112.0000
 
The files were tested under Matlab version 5.2.
 
Both quadg and quad2dg are not dependent on the Numerical Integration Toolbox (NIT) or the distchk function in the Statistics Toolbox anymore.

MATLAB release MATLAB 5.2 (R10)
Other requirements It should be noted that both quadg and quad2dg require the Numerical Integration Toolbox (NIT) to calculate the weights. Also note that quad2dg uses distchk function in the Statistics Toolbox to check the integration limits and make sure they
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
25 Oct 2005 Marc Kowalski

Only vectorized version of quad I am aware of. No apparent problems.

10 Jan 2007 Marko Horbatsch

It would be helpful if the argument list conformed to how quadl.m and adaptGK.m work so that one could pass additional arguments into the integrand function *using varargin. For that p1...p9 would have to be removed from the argument list.

30 Aug 2007 q lh

Excellent

11 Sep 2007 mingwen chen

NIT is very good tool

Please login to add a comment or rating.
Updates

modifying description

03 Jan 2005

Removed the dependency on other toolboxes so that the files are now self contained.

Tag Activity for this File
Tag Applied By Date/Time
integration Per A. Brodtkorb 22 Oct 2008 06:30:49
intgration Per A. Brodtkorb 22 Oct 2008 06:30:49
modified Per A. Brodtkorb 22 Oct 2008 06:30:49
functions Per A. Brodtkorb 22 Oct 2008 06:30:49
quadgm Per A. Brodtkorb 22 Oct 2008 06:30:49
numerical integration Per A. Brodtkorb 22 Oct 2008 06:30:49

Contact us at files@mathworks.com