help-octave
[Top][All Lists]

## zeros of bessel functions

 From: john Subject: zeros of bessel functions Date: Sat, 16 Jul 2011 12:22:54 -0700 (PDT)

```Hi,

I'm a hobby mathematician and look for the following.

Zeros of bessel functions.I found this on the internet to compute the zeros
of bessel functions.

I tried this in octave but it seems not be working.Can you help me how I
compute the zeros of bessel

functions in octave,or change the progams I found.

Thank you

Kind regards

from Belgium

Find Zeros Bessel Function

Hi All,

I want to find out the roots of J0(x) = 0. Not at just one point, but a
whole list of them. What is the easiest way of implementing this?

I can put a simple loop around fzero, but that will give me duplicates:

for i = 1:1000
f(i) = fzero((x)besselj(0,x),i);
end

Do any of you know how to implement this?

Thank you very much,

< 3 replies >

Reply 1 >> Re: Find Zeros Bessel Function

Why not just use unique on the results?

Alternatively, you can use my newtzero function. It finds 202 roots, though
they are not guaranteed to be inclusive between min and max.

rt = newtzero((x)besselj(0,x),1);

http://www.mathworks.com/matlabcentral/fileexchange/6924-newtzero

Reply 2 >> Re: Find Zeros Bessel Function

Thanks for your response Matt, the unique function would definitely work
since the point are spaced roughly 'pi' apart.

However, I found another way of doing this:

bessj0 = inline('besselj(0,x)');
for n = 1:n
z(n) = fzero(bessj0,[(n-1) n]*pi);
end

just specify 'n' and it will give you the first n-values of J(z) = 0;

Thanks for the help!

Eelco

Reply 3 >> Re: Find Zeros Bessel Function

In article &lt;hdt0ak\$84r\$1fred.mathworks.com&gt;, feijooosgmail.com says...
Thanks for your response Matt, the unique function would definitely work
since the point are spaced roughly 'pi' apart.

However, I found another way of doing this:

bessj0 = inline('besselj(0,x)');
for n = 1:n
z(n) = fzero(bessj0,[(n-1) n]*pi);
end

just specify 'n' and it will give you the first n-values of J(z) = 0;

Thanks for the help!

Eelco

You are better off using anonymous functions, if this is your strategy:

bessj0 = (x) besselj(O,x)

for n=1:K (shouldn't be n here)
z(n) = fzero(bessj, etc.
end

--

*

--
View this message in context:
http://octave.1599824.n4.nabble.com/zeros-of-bessel-functions-tp3672321p3672321.html
Sent from the Octave - General mailing list archive at Nabble.com.

```