File Exchange

version 1.0.0.0 (5.6 KB) by
numerical integration with vector arguments

Updated 25 Jan 2002

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

Cite As

I seem to get errors with this ....

??? 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 ... ?

Jaime Aviles

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
gives 1.1534e-005!
I give a rating at least 4 because
anwser!

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.

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux