非線形連立方程式の解法

23 次查看(过去 30 天)
聡 渡邉
聡 渡邉 2020-11-30
评论: Naoya 2020-12-3
fsolveの解説に下記の例題がありますが「root2d 入力引数が不足しています」のエラーが出ます。なぜでしょうか?
function F = root2d(x)
F(1) = exp(-exp(-(x(1)+x(2)))) - x(2)*(1+x(1)^2);
F(2) = x(1)*cos(x(2)) + x(2)*sin(x(1)) - 0.5;
fun = @root2d;
x0 = [0,0];
x = fsolve(fun,x0)
  1 个评论
Naoya
Naoya 2020-12-3
function F = root2d(x)
F(1) = exp(-exp(-(x(1)+x(2)))) - x(2)*(1+x(1)^2);
F(2) = x(1)*cos(x(2)) + x(2)*sin(x(1)) - 0.5;
を root2d.m というファイル名の mファイルとして保存し、
>> fun = @root2d;
>> x0 = [0,0];
>> x = fsolve(fun,x0)
をMATLABコマンドウィンドウ上で実行すると解が求められそうですがいかがでしょうか?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 非線形方程式系 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!