Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Trying to solve Bessel function

Subject: Trying to solve Bessel function

From: Yan Rosh

Date: 31 Dec, 2008 12:11:01

Message: 1 of 4

I have this rather silly problem:

I am trying to solve the besselj(1,x) function and I never seem to get the right result.
This is my code:

x = (0:0.001:20);
y = besselj(1,x);
solve(y);
     this returns the following error:
Warning: List of equations is empty.
> In solve at 87

when I tried this:
solve('besselj(1,x)')
  I got only one result
x = 0; (which is correct but not particularly interesting for me...)

Some help would be much appreciated.

Yan

Subject: Trying to solve Bessel function

From: Rune Allnor

Date: 31 Dec, 2008 12:37:21

Message: 2 of 4

On 31 Des, 13:11, "Yan Rosh" <yan_r...@yahoo.com> wrote:
> I have this rather silly problem:
>
> I am trying to solve the besselj(1,x) function

One usually tries to solve *equations*, not functions.

Rune

Subject: Trying to solve Bessel function

From: Alan Weiss

Date: 31 Dec, 2008 13:55:55

Message: 3 of 4

Yan Rosh wrote:
> I have this rather silly problem:
>
> I am trying to solve the besselj(1,x) function and I never seem to get the right result.
> This is my code:
>
> x = (0:0.001:20);
> y = besselj(1,x);
> solve(y);
> this returns the following error:
> Warning: List of equations is empty.
>> In solve at 87
>
> when I tried this:
> solve('besselj(1,x)')
> I got only one result
> x = 0; (which is correct but not particularly interesting for me...)
>
> Some help would be much appreciated.
>
> Yan

I believe what you mean is you would like to find a root of
besselj(1,x). The fzero function performs one-dimensional nonlinear
root-finding. Try, for example,
rootx = fzero(@(x)besselj(1,x),3)
to find the root near x = 3.

rootx =

     3.8317

Alan Weiss
MATLAB mathematical toolbox documentation

Subject: Trying to solve Bessel function

From: Yan Rosh

Date: 31 Dec, 2008 15:52:02

Message: 4 of 4

> I believe what you mean is you would like to find a root of
> besselj(1,x). The fzero function performs one-dimensional nonlinear
> root-finding. Try, for example,
> rootx = fzero(@(x)besselj(1,x),3)
> to find the root near x = 3.
>
> rootx =
>
> 3.8317
>
> Alan Weiss
> MATLAB mathematical toolbox documentation

Yeah, thats exactly what I meant... I just forgot the English word for it. Thanks!

Yan

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us