搜索附件  
头雁微网 附件中心 专业技术 微波工程 Bessel函数导数的零点计算代码(MATLAB): BesselPrime.rar
板块导航
附件中心&附件聚合2.0
For Discuz! X3.5 © hgcad.com

Bessel函数导数的零点计算代码(MATLAB): BesselPrime.rar

 

Bessel函数导数的零点计算代码(MATLAB):
共享一个MATLAB的Bessel函数导数的零点计算代码。可以很方便计算Bessel函数导数的零点,特别对圆波导的TE模式计算有用。

  1. clc;
  2. clear all;
  3. maxv = 5;
  4. maxs = 5;
  5. y= zeros(maxv, maxs);
  6. incr = 4.0;
  7. for v=0:maxv-1
  8.    h = (v-1)+1.9*(v-1)^(1/3)+1;
  9.     if (v==0)
  10.         y(v+1,1) = fzero(@(x)(besselj(v-1,x)-besselj(v+1,x)),3.5);
  11.     else
  12.         y(v+1,1) = fzero(@(x)(besselj(v-1,x)-besselj(v+1,x)),h);
  13.     end
  14.     for s=2:maxs
  15.         y(v+1,s) = fzero(@(x)(besselj(v-1,x)-besselj(v+1,x)),y(v+1,s-1)+incr);
  16.     end   
  17. end
  18. y
复制代码

支持分享啊!
楼主如果需要besselj的零点,我可以提供更加精确的,突然发现第一类贝塞尔函数的0,1,2阶函数也可以用求解微分方程的办法求得,而且精度非常高,如果需要情高出我
本帖最后由 00d44 于 2010-5-8 21:42 编辑



    谢谢,也欢迎你共享在论坛上
我们支持大家在这里分享讨论
本帖最后由 kerbcurb 于 2010-2-21 15:22 编辑

这里有一个表:

Roots of Bessel functions (15 digits)
The n-th roots of Jm(x)=0. m\n  n=1 n=2 n=3 n=4 n=5

m=0  2.40482555769577 5.52007811028631 8.65372791291101 11.7915344390142 14.9309177084877
m=1  3.83170597020751 7.01558666981561 10.1734681350627 13.3236919363142 16.4706300508776
m=2  5.13562230184068 8.41724414039986 11.6198411721490 14.7959517823512 17.9598194949878
m=3  6.38016189592398 9.76102312998166 13.0152007216984 16.2234661603187 19.4094152264350
m=4  7.58834243450380 11.0647094885011 14.3725366716175 17.6159660498048 20.8269329569623
m=5  8.77148381595995 12.3386041974669 15.7001740797116 18.9801338751799 22.2177998965612
m=6  9.93610952421768 13.5892901705412 17.0038196678160 20.3207892135665 23.5860844355813
m=7  11.0863700192450 14.8212687270131 18.2875828324817 21.6415410198484 24.9349278876730
m=8  12.2250922640046 16.0377741908877 19.5545364309970 22.9451731318746 26.2668146411766
m=9  13.3543004774353 17.2412203824891 20.8070477892641 24.2338852577505 27.5837489635730
m=10  14.4755006865545 18.4334636669665 22.0469853646978 25.5094505541828 28.8873750635304

--------------------------------------------------------------------------------

Roots of Derivatives of Bessel functions
The n-th roots of Jm'(x)=0. m\n  n=1 n=2 n=3 n=4 n=5

m=0  3.83170597020751 7.01558666981561 10.1734681350627 13.3236919363142 16.4706300508776
m=1  1.84118378134065 5.33144277352503 8.53631636634628 11.7060049025920 14.8635886339090
m=2  3.05423692822714 6.70613319415845 9.96946782308759 13.1703708560161 16.3475223183217
m=3  4.20118894121052 8.01523659837595 11.3459243107430 14.5858482861670 17.7887478660664
m=4  5.31755312608399 9.28239628524161 12.6819084426388 15.9641070377315 19.1960288000489
m=5  6.41561637570024 10.5198608737723 13.9871886301403 17.3128424878846 20.5755145213868
m=6  7.50126614468414 11.7349359530427 15.2681814610978 18.6374430096662 21.9317150178022
m=7  8.57783648971407 12.9323862370895 16.5293658843669 19.9418533665273 23.2680529264575
m=8  9.64742165199721 14.1155189078946 17.7740123669152 21.2290626228531 24.5871974863176
m=9  10.7114339706999 15.2867376673329 19.0045935379460 22.5013987267772 25.8912772768391
m=10  11.7708766749555 16.4478527484865 20.2230314126817 23.7607158603274 27.1820215271905

数据来自:http://wwwal.kuicr.kyoto-u.ac.jp ... a4/besselroot.htmlx
我自己的程序还没有写好,等写好后再发
更强的是这里还发现一个在线计算的:
http://cose.math.bas.bg/webMathe ... ing/BesselZeros.jsp
自己以前的工程中有一个计算零点的Fortran函数,有空找出来共享
本帖最后由 kerbcurb 于 2010-2-23 17:04 编辑

今天完成Jn,Yn零点的计算,导数的还得等一段时间,精度是小数点后第9位
,比在线计算的差一点
这100个是J0的
2.40482556043592
5.52007810562151
8.65372791347466
11.7915344396036
14.9309177090658
18.0710639685093
21.2116366304887
24.3524715313617
27.4934791326521
30.634606469042
33.7758202141816
36.9170983542703
40.058425765233
43.1997917137803
46.3411883722644
49.4826098979996
52.6240518417162
55.7655107556208
58.9069839266814
62.0484691908273
65.1899648008068
68.3314693304566
71.4729816041934
74.6145006443015
77.7560256309876
80.8975558717372
84.0390907775377
87.1806298442407
90.32217263781
93.4637187825443
96.6052679515958
99.7468198592802
102.888374254794
106.029930917051
109.171489650405
112.313050281095
115.454612654267
118.596176631472
121.737742088551
124.879308913833
128.020877006608
131.162446275814
134.304016638905
137.445588020884
140.587160353454
143.72873357429
146.870307626397
150.011882457555
153.153458019828
156.295034269134
159.436611164863
162.578188669547
165.719766748555
168.861345369836
172.002924503679
175.144504122503
178.286084200674
181.427664714332
184.569245641239
187.71082696065
190.852408653182
193.99399070071
197.135573086262
200.277155793933
203.418738808799
206.560322116845
209.701905704895
212.84348956055
215.985073672135
219.126658028641
222.268242619685
225.40982743546
228.5514124667
231.692997704639
234.834583140984
237.976168767877
241.117754577869
244.259340563897
247.400926719254
250.542513037571
253.684099512794
256.825686139166
259.967272911206
263.108859823697
266.250446871667
269.392034050377
272.533621355306
275.675208782139
278.816796326754
281.958383985216
285.099971753761
288.241559628789
291.383147606856
294.524735684666
297.66632385906
300.807912127012
303.949500485622
307.091088932106
310.232677463796
313.374266078129
这100个是J1的,实际上就是J0'的
3.83170597025677
7.01558667726263
10.173468135833
13.3236919371522
16.4706300516976
19.6158585112682
22.7600843813853
25.9036720884103
29.0468285357109
32.1896799117712
35.3323075508833
38.4747662355733
41.617094213618
44.7593189984578
47.9014608879916
51.0435351843786
54.1855536418692
57.3275254387095
60.4694578461564
63.6113566992905
66.7532267349081
69.8950718383056
73.0368952263838
76.1786995854515
79.3204871762865
82.4622599151838
85.6040194371605
88.7457671457366
91.8875042525053
95.0292318088551
98.1709507316011
101.312661823849
104.454365792093
107.596063260319
110.73775478171
113.879440848405
117.021121899703
120.162798328959
123.304470489446
126.446138699327
129.587803245914
132.72946438932
135.871122365599
139.01277738947
142.154429656669
145.296079346006
148.437726621152
151.579371632211
154.721014517096
157.86265540274
161.004294406172
164.145931635459
167.287567190554
170.429201164036
173.570833641786
176.712464703573
179.854094423598
182.995722870963
186.137350110105
189.278976201186
192.420601200435
195.562225160472
198.703848130587
201.845470157
204.987091283102
208.128711549659
211.270330995017
214.411949655271
217.553567564434
220.695184754579
223.836801255981
226.978417097239
230.120032305388
233.26164690601
236.403260923324
239.544874380279
242.686487298638
245.828099699049
248.969711601119
252.111323023478
255.252933983837
258.394544499049
261.536154585153
264.677764257431
267.819373530444
270.96098241808
274.10259093359
277.244199089624
280.385806898265
283.52741437106
286.669021519052
289.810628352803
292.952234882423
296.093841117591
299.235447067583
302.377052741286
305.518658147225
308.660263293573
311.801868188179
314.943472838576
回复 10# kerbcurb


    是单精度还是双精度计算?
是双精度计算
本帖最后由 kerbcurb 于 2010-2-24 13:31 编辑

从昨天到现在一直在研究这个问题,感觉Wolfram 公司的webComputing 提供的在线计算得出的J0的根可以准确到15位,我这里的得出的前100为的数据感觉比他的准确,因为没有权威的数据可以比较,自认为以下的数据至少是15位精度的:
2.40482555769577276
5.52007811028631064
8.65372791291101221
11.79153443901428160
14.93091770848778590
18.07106396791092250
21.21163662987925890
24.35247153074930270
27.49347913204025480
30.63460646843197510
33.77582021357356870
36.91709835366404400
40.05842576462823930
43.19979171317673040
46.34118837166181400
49.48260989739781720
52.62405184111499600
55.76551075501997930
58.90698392608094210
62.04846919022716990
65.18996480020686050
68.33146932985679830
71.47298160359373280
74.61450064370183790
77.75602563038805510
80.89755587113762790
84.03909077693819020
87.18062984364115370
90.32217263721048010
93.46371878194477420
96.60526795099626880
99.74681985868059650
102.88837425419479500
106.02993091645161600
109.17148964980538400
112.31305028049491000
115.45461265366694000
118.59617663087253200
121.73774208795096300
124.87930891323294600
128.02087700600832400
131.16244627521391500
134.30401663830546600
137.44558802028427800
140.58716035285429700
143.72873357368973300
146.87030762579665000
150.01188245695475800
153.15345801922789300
156.29503426853352400
159.43661116426314600
162.57818866894667800
165.71976674795502100
168.86134536923582600
172.00292450307820000
175.14450412190274300
178.28608420007377100
181.42766471373105100
184.56924564063871800
187.71082696004936000
190.85240865258152200
193.99399070010912000
197.13557308566141500
200.27715579333241200
203.41873880819864600
206.56032211624447400
209.70190570429407500
212.84348955994948300
215.98507367153401300
219.12665802804056800
222.26824261908431400
225.40982743485933000
228.55141246609881300
231.69299770403853900
234.83458314038324100
237.97616876727566300
241.11775457726802300
244.25934056329568300
247.40092671865282500
250.54251303696995600
253.68409951219308100
256.82568613856441300
259.96727291060447200
263.10885982309547100
266.25044687106588000
269.39203404977606700
272.53362135470493200
275.67520878153745400
278.81679632615308700
281.95838398461492000
285.09997175315956500
288.24155962818769600
291.38314760625521200
294.52473568406495200
297.66632385845894300
300.80791212641113500
303.94950048502058100
307.09108893150503900
310.23267746319496100
313.37426607752784500

本次回帖给出的J0的100个根是根据求解微分方程的办法得出的,速度较慢,但是精度自认为应该没有问题,我与Matlab比较过过在自变量从0到2222时,J0,J0'【等于-J1】等精度不小于matlab提供的数据,通过牛顿法求解出根,根的精度也应该在15位。

网上流行的bessel函数的计算公式,是这样的:自变量小于8的时候采用Pade分式逼近,精度等级是9位的,自变量大于8采用级数的办法计算,我隐约记得精度不高于12位,因为2004年的时候研究过这个问题,
如果想提高在变量大于8以后的函数的精度,必须重新找到一组系数,好像当时我找到过,但是忘记代码放在什么地方了,应该可以找到。因此前几个帖子提供的数据是9位的。

另外John F. Hart在 Computer Approximations中给出了多组Pade分式插值的系数,我整理了一组,据说在自变量小于8的时候,精度可以达到23位,在这里发给大家:    long double Q[10] = {1641556014884554385346137.617, 16033037244408932735390.45602, 79130437776464052403.23616203, 261316531332515327.8086066185, 642960791882601.77592892131, 1237672982083.40790348317773, 1893012093.677918995179541438, 2263381.356781110003609399116, 1974.019272727281783930443513, 1.0};
    long double P[10] = {1641556014884554385346147.435, -394355966476729663601261.6471, 21720183859245393139822.87997, -481485995206981764828.5245941, 5345457598841972345.381674607, -33015389256896376.8646542622, 118739068121104.2949874031474, -247985116789.6144439689877514, 280314894.0831953934479400118, -133662.5500481224741885945416};

Pade插值大家都知道,P是分子的系数,Q是分母的系数,自变量的阶数是升序。


完后我会提供15为精度100个J0'的根,
J0‘的前100个根,不小于15位精度
3.83170597020751183
7.01558666981561840
10.17346813506272180
13.32369193631422290
16.47063005087763270
19.61585851046824190
22.76008438059277180
25.90367208761838250
29.04682853491685490
32.18967991097440340
35.33230755008386460
38.47476623477161440
41.61709421281444990
44.75931899765282050
47.90146088718544580
51.04353518357150790
54.18555364106131880
57.32752543790100880
60.46945784534748950
63.61135669848123040
66.75322673409849140
69.89507183749577210
73.03689522557383310
76.17869958464145600
79.32048717547629800
82.46225991437355510
85.60401943635022980
88.74576714492630580
91.88750425169498430
95.02923180804469440
98.17095073079078130
101.31266182303873000
104.45436579128276000
107.59606325950917200
110.73775478089921500
113.87944084759499800
117.02112189889242500
120.16279832814900400
123.30447048863571800
126.44613869851659600
129.58780324510399700
132.72946438850961700
135.87112236478900200
139.01277738865970500
142.15442965585903100
145.29607934519590900
148.43772662034223200
151.57937163140143000
154.72101451628595600
157.86265540193030000
161.00429440536199600
164.14593163464963900
167.28756718974408700
170.42920116322663600
173.57083364097593200
176.71246470276376100
179.85409442278838900
182.99572287015297000
186.13735010929551300
189.27897620037601900
192.42060119962571000
195.56222515966258800
198.70384812977705700
201.84547015619088800
204.98709128229235000
208.12871154885006500
211.27033099420777300
214.41194965446197600
217.55356756362419600
220.69518475376936600
223.83680125517173500
226.97841709642947800
230.12003230457910600
233.26164690520062200
236.40326092251430800
239.54487437946987800
242.68648729782871700
245.82809969823981500
248.96971160030994500
252.11132302266860200
255.25293398302814000
258.39454449823952700
261.53615458434407700
264.67776425662150400
267.81937352963458800
270.96098241727073600
274.10259093278068600
277.24419908881457900
280.38580689745560400
283.52741437025141000
286.66902151824345000
289.81062835199441500
292.95223488161390900
296.09384111678248100
299.23544706677414900
302.37705274047751900
305.51865814641560000
308.66026329276441000
311.80186818737045600
314.94347283776716800
采用双精度的计算,有效数字是15位,国外是采用双精度计算
今天把那个东西做完了,发给大家,欢迎拍砖,
[hide]

[/hide]
本帖最后由 kerbcurb 于 2010-2-26 19:33 编辑

如果有人需要bessel函数2阶、3阶乃至4阶导数的零点,你说一下,也可以做到的,这一次只做到1阶导数的零点。下面的视屏是使用演示。

解压后,用视频播放器或者Ie浏览器播放,打开那个文件夹,双击besselzeros.html文件,如果不能打开,使用暴风影音打开besselzeros.swf文件也可以
辛苦了,谢谢共享
本帖最后由 kerbcurb 于 2010-2-26 20:35 编辑

我本身不研究波导,这个我用不着,如果需要求解哪一类方程,我会用其他方法
16楼是那个工具软件,17楼是使用演示
回复 20# kerbcurb


    可以单独发个帖子,把他展示出来
原创帖子,支持啊
以前发的有一些问题,最终的版本[目前没有发现问题]的见这里:http://www.baisi.net/thread-3007358-1-2.html
提供那个附件,因不是会员,不能下载,楼上提供方便,也共享在这里
本帖最后由 kerbcurb 于 2010-6-2 09:51 编辑

献丑了:欢迎拍砖,其中nu表示阶数,nth表示零点的数量,根的编号从零开始[这应该算是一个小问题,不过影响不大]。
kerbcurb 发表于 2010-6-2 09:47
献丑了:欢迎拍砖,其中nu表示阶数,nth表示零点的数量,根的编号从零开始[这应该算是一个小问题,不过影响 ...

能否下载下来啊
下载下来先学习下
正好用到,下载下来看看,感谢楼主
客服中心 搜索
关于我们
关于我们
关注我们
联系我们
帮助中心
资讯中心
企业生态
社区论坛
服务支持
资源下载
售后服务
推广服务
关注我们
官方微博
官方空间
官方微信
返回顶部