Integral of bessel function returns all zeros
Show older comments
besselfunc = @(x) besselk(5/3,x);
for n = 1:length(l)
xmin = 4*pi*Rc/(3*l(n)*gamma^3); % lower bound integral
K(n) = integral(besselfunc,xmin,Inf); %integral
end
I am trying to compute the integral of a Bessel function for all values of an array.
The issue is that the integral function always returns zero, so that K(n) is just an array of zeros. I have tried with other more simple functions instead of a Bessel function and it all works. I have also plotted the Bessel function and it seems correct. So what is going wrong here?
The formula for xmin contains some parameters but seems to work so disregard it.
Thanks for any help!
Accepted Answer
More Answers (0)
Categories
Find more on Bessel functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!