フィルターのクリア

set of transcendental equations

1 回表示 (過去 30 日間)
John Moseley
John Moseley 2014 年 4 月 28 日
編集済み: Star Strider 2014 年 4 月 29 日
Hello,
Below is a transcendental equation that I would like to solve:
z*besselj(1,z) - c*besselj(0,z) = 0
where c is a constant and z is the variable to be determined. I know that I need to solve this using fzero(fun,x0) and I would like to use the initial value x0=1. However, I am struggling with "fun", i.e., I'm not sure how to make the above equation into the right format to use in fzero. Ultimately, I would like to make a list of solutions of z for each value of c from 0 to 225 with a step size of 0.01.
Anything helps!
Thanks,
John

採用された回答

Star Strider
Star Strider 2014 年 4 月 28 日
I suggest:
f = @(z,c) z.*besselj(1,z) - c.*besselj(0,z);
then call fzero with a vector of c values:
c = ...
for k1 = 1:length(c)
ci = c(k1);
z = fzero(@(z) f(z,ci), 1);
end
There are going to be an infinity of zeros for every value of c, so obviously more than one solution.
  6 件のコメント
John Moseley
John Moseley 2014 年 4 月 29 日
I just remembered to do that. Sorry about that.
John
Star Strider
Star Strider 2014 年 4 月 29 日
編集済み: Star Strider 2014 年 4 月 29 日
Thanks!
I also should have made sure I’d added the subscript to z in my first post.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by