非線形連立方程式の解法
20 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
0.05*cos(theta21) + 0.04*cos(theta22) = 0.07;
0.05*sin(theta21) + 0.04*sin(theta22) = 0.01235;
からtheta21,theta22を解きたいのですが、どのようにmファイルに記述すればよろしいでしょうか?
0 Commenti
Risposte (1)
Hernia Baby
il 26 Lug 2022
fsolveを参考にしてみてください。
以下は上記関数の一例になります。
fun = @root2d;
x0 = [0,0];
x = fsolve(fun,x0)
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;
end
0 Commenti
Vedere anche
Categorie
Scopri di più su 線形代数 in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!