How to simulate a spherical pendulum in matlab?
9 views (last 30 days)
Show older comments
Bas Siebers
on 10 Feb 2015
Commented: Bas Siebers
on 22 Apr 2015
Hi,
I want to simulate a spherical pendulum in matlab. So far, I have found the equation of motion of the spherical pendulum:

But I haven't a clue how to simulate this. Any help whil be useful.
Kind regards, Bas
0 Comments
Accepted Answer
Roger Stafford
on 11 Feb 2015
Edited: Roger Stafford
on 11 Feb 2015
Bas, you have a sign error in the gravity term. It should be:
-g*sin(phi)/L
Use one of matlab's 'ode' solvers to numerically solve these equations. Read about how to use them at:
http://www.mathworks.com/help/matlab/math/ordinary-differential-equations.html
Note that you would have numerical accuracy difficulty if the angle phi approaches near zero because of the division by sin(phi) in the first equation. At that point theta would change very rapidly. That is inherent in the physical situation as measured by the two angles.
More Answers (1)
Youssef Khmou
on 11 Feb 2015
Edited: Youssef Khmou
on 11 Feb 2015
You can look for solution in this link :
0 Comments
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!