Symbolically Solving a multi-variable system of three equations for three variables

15 次查看(过去 30 天)
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)

采纳的回答

Ameer Hamza
Ameer Hamza 2020-4-1
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))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Equation Solving 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by