フィルターのクリア

Solving Nonlinear Equations - 3 equations 3 unknowns

1 回表示 (過去 30 日間)
Lydia
Lydia 2012 年 6 月 11 日
I'm trying to solve a set of equations containing trigonometric functions, and am having a hard time figuring out what to do. I have the following equations:
A*cos(y)*cos(z) + B*cos(y)*sin(z) - C*sin(y) = D
A*(sin(x)*sin(y)-sin(z)*cos(x)) + B*(sin(x)*sin(y)*sin(z)+cos(x)*cos(z)) + C*sin(x)*cos(y) = E
A*(cos(x)*sin(y)*cos(z)+sin(x)*sin(z)) + B*(cos(x)*sin(y)*sin(z)-sin(x)*cos(z)) + C*cos(x)*cos(y) = F
I know the values for A, B, C, D, E, and F, and am trying to solve for x, y, and z. I have found numerous solution suggestions online, but none have worked. Any suggestions, or even just an example that I could base my solution off of would be appreciated.
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 6 月 11 日
Is that attempting to calculate the rotation angles that result in a particular final position? If so then my recollection is that there are multiple solutions.

サインインしてコメントする。

回答 (1 件)

Benjamin Schwabe
Benjamin Schwabe 2012 年 6 月 11 日
You might be able to use a newton iteration for this problem. The MATLAB command is fmincon (you require the optimization toolbox). Before you have to reformulation the problem into a minimzation problem, which is quite easy, just write everything on the left side and apply a norm to this vector.
You might also try fsolve or fzero.
However, if there are multiple solutions (and it surely looks like that), consider restraining the solution space e.g. x,y,Z have to be within -pi to +pi. Then you have to use fmincon.
In case these methods do not work, you can choose one variable arbitraily and still obtain at least one solution.
Hope that helps, Ben
  1 件のコメント
Lydia
Lydia 2012 年 6 月 11 日
Thanks! I'll give that a try.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by