Solving 2 equations and 2 unknowns

%%here's the code below
syms theta1 theta2
f=cos(theta2)-cos(theta1)/(theta2-theta1) == 0.604;
g=(theta1+theta2)*(sin(theta1)+sin(theta2))/(pi^2 - (theta1-theta2)^2) == 0.0073;
soln=solve([f,g], [theta1,theta2]);
theta1=soln.theta1;
theta2=soln.theta2;
Warning: Unable to solve symbolically. Returning a numeric solution using vpasolve.
> In solve (line 304)
In Untitled (line 5)
I wanted to solve for theta1 and theta2 in the equations, but there is a warning when I ran this code.Could you please help me?

回答 (1 件)

John D'Errico
John D'Errico 2019 年 1 月 3 日
編集済み: John D'Errico 2019 年 1 月 3 日

0 投票

You got a solution. So what is the problem?
theta1
theta1 =
-27.304419783125266662080772270734
theta2
theta2 =
99.603101093869382727005185079214
There is no analytical solution, as you were informed by the warning. A warning is not an error, in this case just there to notify you of something pertinent.

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

タグ

質問済み:

2019 年 1 月 3 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by