Clear Filters
Clear Filters

the question is to get Fab and theta, but the code below i cant run it, dont know which part is error

1 view (last 30 days)
syms Fab theta
W=9.81*10;
Theta1=45*1/180*pi;
Theta2=75*1/180*pi;
eqns= [0==(W*sin(Theta1)-W*sin(Theta2))/Fab*sin(theta),0==(-W*cos(Theta1)-W*cos(Theta2))/Fab*cos(theta)]
vars=[Fab theta]
S=solve(eqns,vars)

Answers (1)

Walter Roberson
Walter Roberson on 25 Jun 2021
syms Fab theta
W = sym(981)/100*10
W = 
Theta1 = sym(45)*1/180*sym(pi)
Theta1 = 
Theta2 = sym(75)*1/180*sym(pi)
Theta2 = 
eqns= [0==(W*sin(Theta1)-W*sin(Theta2))/Fab*sin(theta),0==(-W*cos(Theta1)-W*cos(Theta2))/Fab*cos(theta)]
eqns = 
vars=[Fab theta]
vars = 
S=solve(eqns,vars)
S = struct with fields:
Fab: [0×1 sym] theta: [0×1 sym]
Look at the two equations. 0 on one side, constant times trig divided by Fab on the other. Multiply both sides of both equations by Fab, getting 0*Fab = constant * sin(theta) for the first equation, and 0*Fab = constant*cos(theta) for the other. Divide through by the respective constants, and you get 0 = sin(theta) for the first one, and 0 = cos(theta) for the other one. But there is no theta for which that is true that sin() and cos() are both 0.
So multiplying both sides by Fab doesn't go anywhere. Is there an additional possibility? Mathematically yes: Fab could be infinite and theta could be any real value. But you can't say which real value; all of them are solutions.
What about complex values? Well, complex values for theta leads to the possibility that sin(theta) or cos(theta) could include an infinity, and then you could end up with infinity divided by infinity that woud not necessarily give you 0. But for finite complex values then you can get 0 on both sides if Fab is infinite.

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!