why do I receive syms requires Symbolic math tool box

56 次查看(过去 30 天)
syms M m L q d_q dd_q x d_x dd_x g b J F
eq1= (M+m)*dd_x + m*L*(dd_q*cos(q)-d_q^2*sin(q))+b*d_x-F;
eq2= (J+mL)*dd_q+m*L*dd_x*cos(q)+m*L*g*cos(q);
solu=solve(eq1,eq2,dd_x,dd_q)
solu.dd_x
solu.dd_q

采纳的回答

Stephan
Stephan 2022-12-9
编辑:Stephan 2022-12-9
"why do I receive syms requires Symbolic math tool box?" - Simple: Because syms is part of the symbolic toolbox. If your license doesn't cover that toolbox you are not able to use it's features.
In eq2 i replaced (J+mL) through (J+m*L):
syms M m L q d_q dd_q x d_x dd_x g b J F
eq1= (M+m)*dd_x + m*L*(dd_q*cos(q)-d_q^2*sin(q))+b*d_x-F;
eq2= (J+m*L)*dd_q+m*L*dd_x*cos(q)+m*L*g*cos(q);
solu=solve(eq1,eq2,dd_x,dd_q)
solu = struct with fields:
dd_x: (F*J + F*L*m - J*b*d_x + L^2*g*m^2*cos(q)^2 + L^2*d_q^2*m^2*sin(q) - L*b*d_x*m + J*L*d_q^2*m*sin(q))/(- L^2*m^2*cos(q)^2 + L*m^2 + M*L*m + J*m + J*M) dd_q: -(L*m*cos(q)*(L*m*sin(q)*d_q^2 + F + M*g - b*d_x + g*m))/(- L^2*m^2*cos(q)^2 + L*m^2 + M*L*m + J*m + J*M)
solu.dd_x
ans = 
solu.dd_q
ans = 

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by