Equation of three variables but...
Mostrar comentarios más antiguos
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?
Respuestas (2)
Walter Roberson
el 28 de Mzo. de 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
el 28 de Mzo. de 2013
9 comentarios
Son Goku ssj4
el 28 de Mzo. de 2013
Walter Roberson
el 28 de Mzo. de 2013
Try
[F1sol, F2sol, alpha2sol] = solve( ...
F1*cos(alpha1rad) + F2*cos(alpha2),...
F1*sin(alpha1rad) - F2*sin(alpha2) - F3,...
-F2*sin(alpha2)*a + F2*cos(alpha2)*b - F3*c,...
F1, F2, alpha2 )
Son Goku ssj4
el 31 de Mzo. de 2013
Walter Roberson
el 31 de Mzo. de 2013
Remember roundoff.
As you are working symbolically, I recommend you use
alpha_I_rad = alpha_I * sym('pi/180'); %degree to radians
Son Goku ssj4
el 31 de Mzo. de 2013
Walter Roberson
el 31 de Mzo. de 2013
What are SR Suma(X) and so on?
After quite a bit of work, I determined that if all of your constants a, b, etc., are taken as being accurate to 10 digits, then the equations have two real solutions (and two imaginary solutions) with the real solutions being
F_I = 1640 +/- 0.0129
F_C = -815 +/- 0.0484
alpha_C_rad = -0.306 +/- 0.0000185
or alternately
F_I = -1050 +/- 0.00525
F_C = -2180 +/- 0.0258
alpha_C_rad = -1.34 +/- 0.00000241
(Bleh! I hate having to fight the tools I'm using!!)
Remember, this assumes your constants are 10 digits accurate, which does not appear to be at all justified given their two digits after the decimal place values. It would take me a bunch more work to figure it out under the normal assumption that something given to 2 decimal digits should represent accuracy within +/- 0.005. (Now I know what to watch out for in the tools, but it is still a pain.)
Son Goku ssj4
el 31 de Mzo. de 2013
Walter Roberson
el 31 de Mzo. de 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
el 31 de Mzo. de 2013
Categorías
Más información sobre Special Values en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!