Equation of three variables but...

4 次查看(过去 30 天)
Son Goku ssj4
Son Goku ssj4 2013-3-28
Hello, I've got an equation which I don't know how to solve in Matlab.
F1*cos(alpha1) + F2*cos(alpha2) = 0
F1*sin(alpha1) - F2*sin(alpha2) = F3
-F2*sin(alpha2)*a + F2*cos(alpha2)*b = F3*c
Variables: F1 | F2 | alpha2
a = 330, b=183, c=124, F3 = 1200, alpha1 = 50°
Is there a way to solve it?

回答(2 个)

Walter Roberson
Walter Roberson 2013-3-28
syms F1, F2, alpha2
a = 330; b=183; c=124; F3 = 1200; alpha1 = 50;
[F1sol, F2sol, alpha2sol] = solve( F1*cosd(alpha1) + F2*cosd(alpha2), F1*sind(alpha1) - F2*sind(alpha2) - F3, -F2*sind(alpha2)*a + F2*cosd(alpha2)*b - F3*c, {F1, F2, alpha2} );
You might want to simplify() the results.
The result might perhaps have a RootOf() in F2 and alpha2.
The result will be symbolic rather than numeric. If you want the numeric result, use double() around the answers.
Note: there are two answers. F1 is the same for both, F2 is positive of negative of the same value for both, and alpha2 differs between the two.

Son Goku ssj4
Son Goku ssj4 2013-3-28
I tried something similar the another time but I hit the wall with:
Undefined function 'cosd' for input arguments of type 'sym'.
I don't know what's the problem here. Can't have "sym" in cos / sin / tan etc.? So still not solved.
  9 个评论
Walter Roberson
Walter Roberson 2013-3-31
How can you use the third equation to expression F_I in one step? The third equation involves alpha_C_rad, so you would only be able to express it dependent on alpha_C_rad instead of getting a numeric value in one step ??
Son Goku ssj4
Son Goku ssj4 2013-3-31
Ah, sorry. I was referring to this system of equation:
One has
-F_I*cos(alpha_I)*c-F_I*sin(alpha_I)*a+Fg*d = 0
The other has
F_C*sin(alpha_C)*a-F_C*cos(alpha_C)*c-Fg*b = 0
The equations -must- be equal so I chose the first one.
If I chose the second, I don't seem too have the ability to solve the system of equations. And if I try it in matlab, it gives me different results (F_C, F_I, alpha_C) so I have chosen the first one where the only variable is F_I.
(Not the task I wrote in the first question, I know. Sorry.)

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by