How do i solve f(x,k)=sin(x)-kx on matlab?

I am struggling with solving the above eqn on matlab, can someone please give some guidance, thanks!

2 件のコメント

Star Strider
Star Strider 2014 年 11 月 22 日
What do you mean by ‘solve’?
Please go into some detail as to what do you want to do with it.
John D'Errico
John D'Errico 2014 年 11 月 22 日
"Solve" it? Solve for what? Exactly what problem are you solving for? What unknown? Do you want to solve for that expression equal to zero? Do you want to solve for x or k? Are you looking for a symbolic or numerical solution? Is this homework?

回答 (1 件)

Orion
Orion 2014 年 11 月 22 日
編集済み: Orion 2014 年 11 月 22 日

1 投票

what are x ? k ?
variables ? parameters ?
Anyway, see the doc of fzero
espectially this part, which seems to be what you need
myfun = @(x,c) cos(c*x); % parameterized function
c = 2; % parameter
fun = @(x) myfun(x,c); % function of x alone
x = fzero(fun,0.1)

この質問は閉じられています。

タグ

タグが未入力です。

質問済み:

2014 年 11 月 22 日

閉鎖済み:

2014 年 11 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by