File Exchange

image thumbnail

Bessel Function Zeros

version 1.0 (1.58 KB) by

Computes the first k zeros of the Bessel Function of the 1st and 2nd Kinds.

4.04762
19 Ratings

46 Downloads

Updated

View License

This script uses Halley's method to compute the positive k zeros of the Bessel function of the first kind J(n,x) and second kind Y(n,x) where n is a positive number. The routine has been tested for up to k=100 and n=100.

Comments and Ratings (24)

Lateef Kareem

Lateef Kareem (view profile)

Great job. But it fails to find the first roots when you use bessel of the second kind. for example if i want the zeros of the order 2 second kind,

This algorithm gives
6.7938
10.0235
13.2100
16.3790
19.5390
22.6940
25.8456
28.9951
32.1430
35.2898
38.4357
41.5810
44.7258
47.8701
51.0141
54.1579

whereas the correct values should have been
3.3842
6.7938
10.0235
13.2100
16.3790
19.5390
22.6940
25.8456
28.9951
32.1430
35.2898
38.4357
41.5810
44.7258
47.8701
51.0141

Haven't tested second kind functions though

Utilizei a rotina para calcular a solução analítica da equação da difusão 2D. Ficou muito boa.

Lube F

Lube F (view profile)

what are the advantages of using this over fzero? thanks

Timothy

Mostly seems to work. However, the zeros for the Bessel functions of the second kind are missing the first zero (0.893576966279). That is, the first Y_n zero it gives is actually the second, the second is actually the third, and so on.

Hi all

I am using the function in Matlab R2008a
I entered the command besselzero(1/2,1,2)
and the result is different than the value from
Mathematica s BesselYZero[1/2,1]
I also tried some other combinations which seemed fine.
I just wonder if this is a special case or I should check
the numbers given by this Matlab function with some other online sources. Thanks

Jesús Aurelio

i dont have comments jeje sorry but this informaion is good ! ! thank you!!!

Yaniv Shaposhnik

Thank you, very useful

Farshid Ghassemi

The algorithm is fascinating and the speed is satisfactory. But there is a small defect: For Y function, the initial guess is not correctly chosen and the routine misses the first root in some cases.

miguel m

ionel aurel

Michele Campisi

It works just fine

harrouni lyes

j'ai male a trouver la solution de l'equation dde la gaine fini et infini de la fibre vouler vous m'aider svp.

Warren Parsons

Nice work. You've saved me a lot of time.

Bryan Romero

works great

R Parthasarathy

Good -- more commenting / discussion would be nice.

Kathirvel Thiyagarajan

I am using it. But not sure about its accuracy.

Jim Morehead

T S

Very good. Works perfectly.
Thanks
T.S
BGU University Israel

Hung Lin

PinceDor Ema

French student thank you.
We hope you'll have a good life.

Joey Pittman

I used this m-file to generate the zeros for a bessel function of the first kind and order zero and it worked just fine.

When you run the function, you should use besselzero(n,k,kind) I interpreted the documentation to suggest that the function needs only 2 inputs, but it really requires 3 to work.

Stepan Matejka

It seems the besselzero(n,k,1) and besselzero(n,k,2) works fine. Checked with multiple plot(besselzero(n,100,kind)).
Good work ...

MATLAB Release
MATLAB 7 (R14)
Acknowledgements

Inspired: ZEROBESS, Bessel Zero Solver

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today