绘制并找到贝塞尔函数的根 [英] Plotting and finding roots of bessel functions
问题描述
我正在尝试绘制由在Matlab中添加和相乘的多个贝塞尔函数组成的函数的根.该方程为Jm(ω)* Ik(ω)+ Im(ω)* Jk(ω),其中Jm是第一类阶数m(besselj)的贝塞尔函数. Im是第一种阶m(贝塞利)的修改贝塞尔函数.对于每个模式m = o,1,2,...和n = 1,2,3 ...频率omega(mn)是所列方程式的相应根. m = 0,1,2 n-1,2,3,4.我需要求解12个根的方程式.我是Matlab的新手,这有点超出我的能力了.到目前为止,我已经有了这段代码,但是我不确定脚本中是否需要变量omega.我也查看了其他人关于这个问题的问题,但没有看到任何类似的问题.我所见过的情节与我的情况完全不同,这告诉我我可能是错的.感谢您的帮助.
m=(0:2); k=(1:3); n=(1:4);
Jm=besselj(m,n');
Ik=besseli(k,n');
Jk=besselj(k,n');
Im=besseli(m,n');
g=Jm.*Ik+Im.*Jk
plot(g)
绘图
besselj
和besseli
将您称为omega
的内容作为它们的第二个参数,因此要绘制函数,您应该尝试类似
m=0; k=1; omega=0:0.02:10;
Jm=besselj(m,omega);
Ik=besseli(k,omega);
Jk=besselj(k,omega);
Im=besseli(m,omega);
g=Jm.*Ik+Im.*Jk;
plot(omega,g);
hold all;
plot(omega,0,'k');
axis([min(omega) max(omega) -100 100]);
这向您显示,对于m=1, k=1
,第一个零在3.2、6.3和9.4左右:
通过数字查找根
您可以为函数g
实现 Halley方法 besselj
的根在由Cheery链接的MatlabCentral文件中确定.. >
I am trying to plot roots of a function that is composed of multiple bessel functions being added and multiplied in Matlab. The equation is Jm(omega)*Ik(omega)+Im(omega)*Jk(omega) where Jm is the bessel function of the first kind of order m (besselj). Im is the modified bessel function of the first kind of order m (besseli). For each mode m=o,1,2,...and n=1,2,3... The frequency omega(mn) is the corresponding root of the listed equation. m=0,1,2 n-1,2,3,4. I need to solve the equation for the 12 roots. I am new to Matlab and this is a little out of my league. So far I have this code but I wasn't sure if I needed the variable omega in the script or not. I have also looked at other people's questions on the suject but didn't see any quite like this. The plots I have seen look nothing like mine which tells me I am probably wrong. Thanks for any help.
m=(0:2); k=(1:3); n=(1:4);
Jm=besselj(m,n');
Ik=besseli(k,n');
Jk=besselj(k,n');
Im=besseli(m,n');
g=Jm.*Ik+Im.*Jk
plot(g)
Plotting
besselj
and besseli
take what you call omega
as their second parameter, so to plot your function you should try something like
m=0; k=1; omega=0:0.02:10;
Jm=besselj(m,omega);
Ik=besseli(k,omega);
Jk=besselj(k,omega);
Im=besseli(m,omega);
g=Jm.*Ik+Im.*Jk;
plot(omega,g);
hold all;
plot(omega,0,'k');
axis([min(omega) max(omega) -100 100]);
This shows you that for m=1, k=1
the first zeros are around 3.2, 6.3 and 9.4:
Finding the roots numerically
You could implement Halley's method for your function g
, similar to how the roots of besselj
are determined in the MatlabCentral file linked by Cheery.
这篇关于绘制并找到贝塞尔函数的根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!