Info
This question is closed. Reopen it to edit or answer.
Setting Up Non-Linear Differential Equations Symbolically
1 view (last 30 days)
Show older comments
I am trying to solve a set of non-linear differential equations in MATLAB. When I hit run, I get: "Warning: Unable to solve symbolically. Returning a numeric solution using vpasolve."
My two equations are:
tau=I*theta_dbl_dot
-tau=m*g*l*sin(theta)
Here is my code:
syms tau In theta_dbl_dot theta l m g
eq1=tau==In*theta_dbl_dot;
eq2=-tau--m*g*sin(theta)*l;
sol=solve(eq1,eq2,theta_dbl_dot,m,g,l,theta,In,tau);
theta_dbl_dot_=(sol.theta_dbl_dot)
I believe the answer should be theta_dbl_dot = -(g/l)*sin(theta)
What am I doing wrong? Also, is there a way to linearize the equation or solve the characteristic equation after solving for the non-linear form? I have values for m, g, l, In, and theta.
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!