Matlab Primer

From Sean_Carver
Revision as of 17:42, 3 November 2012 by Carver (talk | contribs) (Pendulum on a movable support)
Jump to: navigation, search

Today's lecture will be on MATLAB and PENDULA (plural of PENDULUM). Your next lab assignment motivated the topic.

My name is Sean Carver; I am a research scientist in Mechanical Engineering. I have been programming in MATLAB for almost 20 years and programming computers for almost 30 years.

Pendulum on a movable support

Consider a pendulum of mass m and length , which is attached to a support with mass M which can move along a line in the x-direction. Let x be the coordinate along the line of the support, and let us denote the position of the pendulum by the angle θ from the vertical.

Sketch of the situation with definition of the coordinates (click to enlarge)
\ddot\theta + \frac{\ddot x}{\ell} \cos\theta + \frac{g}{\ell} \sin\theta = 0.\,

These equations may look quite complicated, but finding them with Newton's laws would have required carefully identifying all forces, which would have been much harder and more prone to errors. By considering limit cases, the correctness of this system can be verified: For example, \ddot x \to 0 should give the equations of motion for a pendulum which is at rest in some inertial frame, while \ddot\theta \to 0 should give the equations for a pendulum in a constantly accelerating system, etc.