No BSD License  

Highlights from
quad_M;quadl_M

4.0

4.0 | 3 ratings Rate this file 3 Downloads (last 30 days) File Size: 5.6 KB File ID: #1260

quad_M;quadl_M

by Mischa Tolsma

 

21 Jan 2002 (Updated 25 Jan 2002)

numerical integration with vector arguments

| Watch this File

File Information
Description

Quad_M and Quadl_M are speed optimized versions of Quad and Quadl that accept vector arguments (not vector integration limits, like quadg).

Possible usage: Numerical integration of a inverse Fourier transform over a given frequency range at several points in time.

Note: matrix arguments can be used when they are transformed into vectors.

Speed up factor ~100

Acknowledgements
This submission has inspired the following:
quadvgk
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 (4)
04 Feb 2002 Kevin Song

I tried this file and it is really fast. However when I use the file for integration with very small values, say bit error rate in terms of 10^(-7) for example, the program will give a extremely small value (say 10^(-100)) which is not the desired answer. Except that, it is a perfect tool.

04 Jun 2002 Yaguang Yang

I know the following integration equals one
(this function is a normal distribution).

function y = pa22(w)
w0=1216.1;
sigma=25;
e=sqrt(sigma)*((2/pi)^(0.25))*exp(-(sigma^2)*((w0+w).^2));
dedw=-2*sigma^2*(w0+w).*e;

a11=a(1)*sin((w0+w)/2)+a(2)*cos((w0+w)/2);
a12=a(1)*cos((w0+w)/2)-a(2)*sin((w0+w)/2);
a22=a11;
y=e.^2;

Unfortunately MATLAB code
quad(@pa11,-1217,-1215)
gives 1.1534e-005!
I give a rating at least 4 because
quad_M(@pa11,-1217,-1215) gives correct
anwser!

29 Mar 2004 Jaime Aviles  
21 Apr 2008 Eric Wade

I seem to get errors with this ....

> [q,f] = quad_M(c4,100,100)
??? Error using ==> fcnchk
FUN must be a function, a valid string expression,
or an inline function object.

Error in ==> quad_M at 83
f = fcnchk(funfcn);

I thought it could take vectors ... ?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
integration Mischa Tolsma 22 Oct 2008 06:40:30
numerical integration Mischa Tolsma 22 Oct 2008 06:40:30
quad Mischa Tolsma 22 Oct 2008 06:40:30
optimized Mischa Tolsma 22 Oct 2008 06:40:30
vector arguments Mischa Tolsma 22 Oct 2008 06:40:30

Contact us at files@mathworks.com