非線形連立方程式の解法
13 views (last 30 days)
Show older comments
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 Comment
Naoya
on 3 Dec 2020
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コマンドウィンドウ上で実行すると解が求められそうですがいかがでしょうか?
Answers (0)
See Also
Categories
Find more on 非線形方程式系 in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!