Be the first to rate this file! 196 downloads (last 30 days) File Size: 2.64 KB File ID: #18801

quadvgk

by Adam Wyatt

 

18 Feb 2008 (Updated 18 Feb 2008)

Code covered by BSD License  

G7-K15 adaptive quadrature on vector-valued functions

Download Now | Watch this File

File Information
Description

Adaptation of quadgk for use on vector valued functions (i.e. the integral of many functions).

The input function should return a matrix of size (NF, NX) where NF is the number of integrals to calculate and NX is the number of points across each function.

This routine is as efficient as quadgk on a single function, more efficient on calculating multiple functions across the same span (provided they require similar sampling).

Consider the following problem:
E(x, L) = int(z = 0..L, fft(E(kx).*exp(i*kx.^2*z/2k)));

quadvgk allows E(kx) to be evaluated once only for every z position, thus significantly improving performance.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
quad_M;quadl_M

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
integration Adam Wyatt 22 Oct 2008 09:48:09
apative Adam Wyatt 22 Oct 2008 09:48:09
quadrature Adam Wyatt 22 Oct 2008 09:48:09
vector Adam Wyatt 22 Oct 2008 09:48:10
valued Adam Wyatt 22 Oct 2008 09:48:10
functions Adam Wyatt 22 Oct 2008 09:48:10
quadrature Anatoly 30 Jun 2009 12:09:22
vector Anatoly 30 Jun 2009 12:09:33
valued Anatoly 30 Jun 2009 12:09:35
vector Matthias Höller 02 Oct 2009 07:39:24
valued Matthias Höller 02 Oct 2009 07:39:31
quadrature Matthias Höller 02 Oct 2009 07:39:35
integration Matthias Höller 02 Oct 2009 07:39:37
 

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