Simple Pendulum Motion using MATLAB
Objective: The equation of motion of a simple pendulum with damping: `(d^2theta)/(dt^2)+(b/m)(d theta)/dt +(g/L)sin theta = 0` By solving this second order ODE, we can get two first order ODE ydot(1) = y(2) ydot(2) = -(b/m)*y(2) - (g/L)*sin(y(1)) Given parameters: m=1 Kg b=0.05 L=1 m g=9.81 m/s^2 time duration = 0 to 20 sec Initial…