非線形連立方程式の解法

조회 수: 35 (최근 30일)
SATOKI KABEYA
SATOKI KABEYA 2022년 7월 26일
답변: Hernia Baby 2022년 7월 26일
0.05*cos(theta21) + 0.04*cos(theta22) = 0.07;
0.05*sin(theta21) + 0.04*sin(theta22) = 0.01235;
からtheta21,theta22を解きたいのですが、どのようにmファイルに記述すればよろしいでしょうか?

답변 (1개)

Hernia Baby
Hernia Baby 2022년 7월 26일
fsolveを参考にしてみてください。
以下は上記関数の一例になります。
fun = @root2d;
x0 = [0,0];
x = fsolve(fun,x0)
Equation solved. fsolve completed because the vector of function values is near zero as measured by the value of the function tolerance, and the problem appears regular as measured by the gradient.
x = 1×2
0.3532 0.6061
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

카테고리

Help CenterFile Exchange에서 非線形方程式系에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!