Symbolic solution to a system of algebraic equations

1 次查看(过去 30 天)
I get an error message stating "Reference to non existent field b" when I try to solve for b in the following system of algebraic equations.
How can I modify the code?
syms a b x N g b L m
eqns = [(1/b)*(-2*N*sin(a))/3==m*L, x/b==-(5*L*cos(a))/6+(5*a^2*L*sin(a))/6, N/b==m*(5*L*sin(a))/6+(5*a^2*L)/(6*cos(a) +3*g)];
S = solve(eqns);
sol = [S.b]

采纳的回答

Birdman
Birdman 2020-4-1
syms a b x N g b L m
eqns = [(1/b)*(-2*N*sin(a))/3==m*L, x/b==-(5*L*cos(a))/6+(5*a^2*L*sin(a))/6, N/b==m*(5*L*sin(a))/6+(5*a^2*L)/(6*cos(a) +3*g)];
S = solve(eqns,[b m x]);
sol = S.b
This will give you the solution.

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by