SOLVING SECOND ORDER ODE USING MATLAB AND ANIMATING THE PENDULUM MOTION
Objective: OBJECTIVE To write a program in matlab to simulate the transient behaviour of a simple pendulum and to create an animation of its motion CODE % constant inputs b = 0.05; g = 9.81; l = 1; m = 1; % intial displacement and velocity initial_conditions = [0;3]; % time intervals for calculating displacement and angular velocity…