4.75

4.8 | 5 ratings Rate this file 4 Downloads (last 30 days) File Size: 1.64 KB File ID: #9626
image thumbnail

rombquad

by Matt Fig

 

13 Jan 2006 (Updated 02 Oct 2008)

Performs Romberg quadrature.

| Watch this File

File Information
Description

I noticed that the two Romberg quadrature functions on the FEX are identical (#34 and #8199). I increased the speed of the calculations for some integrations and simplified the algorithm to use a vector instead of a matrix for the interpolations.

See help for an example

Email me with bugs please. Thanks.

Acknowledgements

Rombint.M inspired this file.

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
integration, numerical, quadrature, romberg quadrature
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
19 Feb 2006 M. Lamb

Note: submission #8199, which is mentioned in the description, has been removed due to clear plagiarism of its "plagi-author" Ahmad Colahi Damirchidaraci.

28 Jan 2006 Andy G.  
19 Jan 2006 Alan Peterson

This function is excellent. Good job.

18 Jan 2006 Anne Howard

Works well, this is a classic form of numerical integration that should come standard in Matlab.

17 Jan 2006 matt fig (author)

Also, the updated (1-16) code has a call to fcnchk that will stall some of the algorithm speed. This was placed so a user could use a non 'vectorized' code. Thanks.

17 Jan 2006 John D'Errico

Further investigation suggests that the lack of significant difference that I saw between this code and either of its replicated antecendents was apparently due to a less sophisticated JIT acceleration in my Matlab release. Newer releases than mine (R14, SP1, on the Mac) will hopefully see a speed enhancement. Older releases may not see any gain.

16 Jan 2006 John D'Errico

A quick test showed no significant difference between this code and either of its replicated antecedents, either in time or accuracy. Plus, this version has only a number of iterations to control the resultant accuracy. This is far less understandable to the user than a number of decimal digits.

Updates
17 Jan 2006

Added ability to use a non-vectorized inline function.

18 Jan 2006

Increased speed by 5%, thanks to a suggestion from John D'Errico.

02 Oct 2008

Added input checking.

Contact us