4.5

4.5 | 12 ratings Rate this file 267 downloads (last 30 days) File Size: 1.69 KB File ID: #4540

Legendre-Gauss Quadrature Weights and Nodes

by Greg von Winckel

 

26 Feb 2004 (Updated 11 May 2004)

Code covered by BSD License  

Computes the Legendre-Gauss weights and nodes for solving definite integrals.

Download Now | Watch this File

File Information
Description

This is a simple script which produces the Legendre-Gauss weights and nodes for computing the definite integral of a continuous function on some interval [a,b]. Users are encouraged to improve and redistribute this script. See also the script Chebyshev-Gauss-Lobatto quadrature (File ID 4461).

MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (15)
24 Jan 2005 Dave Farrell

Very handy tool, which for some reason is missing in matlab, like the zeros of the bessel functions.

I did notice the weights are not normalized to 1 however, which seemed to result in an over estimation of the integral.

Good work and thank you

24 Mar 2005 Tim Warburton

Very nice quadrature routine!.

29 Mar 2005 DEIVEEGAN M  
05 Apr 2005 Nabeel Azar

My QUADG function in the quadrature category contains a subfunction called "gausslegendre" that does an equivalent computation using EIG; it can be used as a separate function if desired.

I don't know about the accuracy of your approach, but if I remember correctly the algorithm I had used is considered quite accurate. It's also very fast.

26 Jun 2005 kumar gautam  
07 Oct 2006 vish j  
09 Jan 2007 s b

works well in emag apps for tough integrands, fast and simple function

04 Aug 2007 Phuong Huynh

I would like Tabulated Gauss points

29 Nov 2007 a a  
02 Mar 2008 Dawid Z

Works pretty well - thanx

22 Apr 2008 Xinghui Zhong  
11 Sep 2008 alex qren  
05 Feb 2009 Mohan KV  
05 Feb 2009 Mohan KV

Neat program. Well done!

22 Mar 2009 Christine Acou

Excellent! Thanks for sharing. Do you have a reference for your algorithm?

Please login to add a comment or rating.
Updates
10 May 2004

Found a bug in scaling of weights. Also slight improvement to speed.

11 May 2004

Forgot to include interval mapping in previous revison.

Tag Activity for this File
Tag Applied By Date/Time
integration Greg von Winckel 22 Oct 2008 07:15:07
legendre Greg von Winckel 22 Oct 2008 07:15:07
quadrature Greg von Winckel 22 Oct 2008 07:15:07
numerical Greg von Winckel 22 Oct 2008 07:15:07
weights Greg von Winckel 22 Oct 2008 07:15:07
nodes Greg von Winckel 22 Oct 2008 07:15:07
 

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