开发者

Solve equation Matlab

开发者 https://www.devze.com 2023-03-07 23:48 出处:网络
Hy can anyone can tell me how i can solve this equation 2xJ1(x) − J0(x) = 0 where J开发者_如何学编程1 and J0are the Bessel function

Hy can anyone can tell me how i can solve this equation 2xJ1(x) − J0(x) = 0 where J开发者_如何学编程1 and J0 are the Bessel function in Matlab without using the fsolve command


You can use fzero to find the zeros if and only if the curve crosses the x-axis. So

fzero(@(x)(2*x*besselj(1,x)-besselj(0,x)),x0)

will give you the zero close to x0.

See this answer of mine for an explanation of when and why fzero fails (although it won't for a Bessel function, it's good to be aware) and the tradeoffs with fsolve.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号