- #1
positroncascade
- 2
- 0
- TL;DR Summary
- I try to plot a figure from an article. The analytical solution is given by Bessel function of order zero. I wrote my MATLAB script but it doesn't give results as expected. I need help on evaluating Bessel function of order zero.
Hello everyone.
I try to plot a figure from a journal article. I gave the equations in the inserted image. I wrote the script given below for that. I expect to obtain a plot like the one given on the left but I end up with something totally different. So, the values of ##I_{0}## and ##I_{1}## are probably wrong. How can I evaluate them correctly? Can you help me to spot my error?
Thank you so much!
I try to plot a figure from a journal article. I gave the equations in the inserted image. I wrote the script given below for that. I expect to obtain a plot like the one given on the left but I end up with something totally different. So, the values of ##I_{0}## and ##I_{1}## are probably wrong. How can I evaluate them correctly? Can you help me to spot my error?
Matlab:
phi = linspace(0.001, 1000, 1000000);
v = 2;
lRp = sqrt((1./phi).*((v+1)^2-1));
I1 = besseli(1,lRp);
I0 = besseli(0,lRp);
h = 1 - 2./lRp*(I1/I0);
plot(phi,h)
set(gca, 'XScale', 'log')
Thank you so much!
Last edited: