4.0

4.0 | 3 ratings Rate this file 143 downloads (last 30 days) File Size: 2.39 KB File ID: #8679

gaussquad

by Matt Fig

 

07 Oct 2005 (Updated 02 Oct 2008)

Code covered by BSD License  

Adaptive form of gaussleg.m.

Download Now | Watch this File

File Information
Description

gaussquad(f,a,b)

GAUSSQUAD uses an adaptive formulation of Gauss-Legendre quadrature to evaluate the integral of f from a to b with default tolerance of 10^-14. User can specify another tolerance by: gaussquad(f,a,b,tol).
The input function f can be an inline or function handle.

Acknowledgements
This submission has inspired the following:
QUADGR
MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
11 Jul 2006 J K

varargin isn't fully implemented

12 Jul 2006 mike kung

Much better.

31 Jul 2006 Fang Chu

Nicely done.

Please login to add a comment or rating.
Updates
18 Oct 2005

The update uses an even number of Gauss points, this eliminates a problem of NaN at zero.

18 Oct 2005

The last update didn't take?

30 Jan 2006

Faster algorithm

30 Jan 2006

Faster algorithm.

31 Jan 2006

Better help text.

02 Feb 2006

Now uses subintervals in the adaptive engine.

12 Jul 2006

Updated from version 6 edition.

02 Oct 2008

Added input checking.

Tag Activity for this File
Tag Applied By Date/Time
integration Matt Fig 22 Oct 2008 08:02:27
gauss Matt Fig 22 Oct 2008 08:02:27
gaussian Matt Fig 22 Oct 2008 08:02:27
quadrature Matt Fig 22 Oct 2008 08:02:27
legendre Matt Fig 22 Oct 2008 08:02:27
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com