Symbolically Solving a multi-variable system of three equations for three variables
19 views (last 30 days)
Show older comments
How can I find symbolic solutions for a,b, and c expressing them with respect to the other variables using the system of equations
(-2Nsinθ)/3=mL(b)
c=-(5bLcosθ)/6+(5(a^2)Lsinθ)/6
N=m( (5bLsinθ)/6+(5(a^2)L)/6cosθ +3g)
0 Comments
Accepted Answer
Ameer Hamza
on 1 Apr 2020
Try this
syms a b c N theta m L b g
eq1 = (-2*N*sin(theta))/3==m*L*b;
eq2 = c == -(5*b*L*cos(theta))/6+(5*(a^2)*L*sin(theta))/6;
eq3 = N == m*((5*b*L*sin(theta))/6+(5*(a^2)*L)/6*cos(theta)+3*g);
sol = solve([eq1 eq2 eq3], [a b c]);
Result:
>> sol.a
ans =
-((8*(9*N - 27*g*m + 5*N*sin(theta)^2))/(15*L*m*cos(theta)))^(1/2)/2
((8*(9*N - 27*g*m + 5*N*sin(theta)^2))/(15*L*m*cos(theta)))^(1/2)/2
>> sol.b
ans =
-(2*N*sin(theta))/(3*L*m)
-(2*N*sin(theta))/(3*L*m)
>> sol.c
ans =
(sin(theta)*(9*N - 27*g*m + 5*N*cos(theta)^2 + 5*N*sin(theta)^2))/(9*m*cos(theta))
(sin(theta)*(9*N - 27*g*m + 5*N*cos(theta)^2 + 5*N*sin(theta)^2))/(9*m*cos(theta))
More Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!