Week 3 - Solving second order ODEs
Inputs are taken as given in the problem
L=1 metre,
m=1 kg,
b=0.05.
g=9.81 m/s
Initial conditions are taken as
Angular displacement = 0, Angular Velocity = 3 rad/sec, at time t = 0
The motion is simulated between 0-20sec
Solving ODE
Ode solver ode45 is used in this matlab program. The results are stored in an array of row atrix of two coloumns, for the values of displacement and velocity at
different time periods.
Ode_func is the function made to solve the given equation . where the asumptions are made in the from of code .
Figure 1: plotting
Here the graph is plotted to get the wave form of the displacement and the velocity from the initial condtions.
Figure 2: plotting
Animating the transient motion of the simple pendulum:
Here we use the concept of the for loop . as the the bob moves with a velocity ,and displaces for the different time period. And recorded it and animated the
path of the oscillations