0

The equation is I0(a*x)=b, where a,b are constants, and I0(y) is zero order bessel function.

I0(x)=1/(2*pi)*integral(x*cos(t)) dt [from 0 ->2*pi]

I want to get the value of x when a and b are given. I just want the result, so it's not necessary to implement the solving procedure all by Matlab, and an approximate answer is fine, too.

CodeGodie
  • 12,116
  • 6
  • 37
  • 66
Alex
  • 15
  • 3

1 Answers1

0

You can use (http://nl.mathworks.com/help/matlab/ref/besselj.html, http://nl.mathworks.com/help/optim/ug/fsolve.html)

x = fsolve(@(x)(besselj(0,a*x)-b),x0);

or using a simpler solver as pointed in the comment below (http://nl.mathworks.com/help/optim/ug/fzero.html)

x = fzero(@(x)(besselj(0,a*x)-b),x0);
Kostya
  • 1,552
  • 1
  • 10
  • 16
  • 1
    Is there a reason you're using `fsolve` to to find what looks to be a univariate root? `fzero` would suffice, would be more efficient, and in some cases, more robust. Also, this is a rather poor quality answer in terms of explanation and formatting. – horchler Dec 03 '14 at 18:14
  • Just typed something off the top of my head :). Tnx, answer updated – Kostya Dec 04 '14 at 06:55