Integral of bessel functions using int/quad

1 view (last 30 days)
Adrien San
Adrien San on 19 Feb 2016
Commented: Torsten on 19 Feb 2016
Hi all,
I'm trying to compute an integral with the function int but it seems like Matlab cannot compute it and does not return a numerical value. Here is my integral which should be close to 1 (probability density).
f = (1/V_A) * r * exp(-(r^2+D^2)/(2*V_A)) * besselj(0,1i*lambda*r/sqrt(V_A));
v = int(f_1,0,1000);
Then, I tried to compute it using the quad/quadl function but it returns :
f_1=@(r) (1/V_A)* r.* exp(-(r.^2+D^2)/(2*V_A)).*besselj(0,1i*lambda*r./sqrt(V_A));
var_th = quadl(f_1,0,1000);
Warning: Infinite or Not-a-Number function
value encountered.
> In quadl at 108
In Unti at 55
Warning: Infinite or Not-a-Number function
value encountered.
> In quadl at 108
In Unti at 55
Do you have any solutions to compute such integrals ?
Thanks,
A
  1 Comment
Torsten
Torsten on 19 Feb 2016
Did you set V_A to something different from null ?
Best wishes
Torsten.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!