ordinary differential equation of pendulum
x'' + (b/m)x' + (g/L)sin(x) = 0
It is a 2nd order ODE and to solve it in MATLAB we need to break it up into two single order ODE as we know 'ode45' is for only single order ODE.
The Angular Displacements and Velocities can be calcaluted and plotted against time.
A zip file of the Animation of how the pendulum comes to rest is added.