Clear Filters
Clear Filters

Equation of three variables but...

4 views (last 30 days)
Son Goku ssj4
Son Goku ssj4 on 28 Mar 2013
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?

Answers (2)

Walter Roberson
Walter Roberson on 28 Mar 2013
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 on 28 Mar 2013
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 Comments
Walter Roberson
Walter Roberson on 31 Mar 2013
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 on 31 Mar 2013
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.)

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!