Basic programming in MATLAB Velocity & displacement of simple pendulum
Objective: Youtube link: https://youtu.be/YVHlv_63OcQ %simple pendulumclear allclose allclcl=1;b=0.05;m=5;g=9.81;%Time t = [0 20];%initial conditiontheta_0=[0 3];%solving ode using ode45[t,theta] = ode45('odefun_second_orders',t,theta_0);%plottingfigure(1)%subplot(2,1,1)plot(t,theta(:,1),'color','r','linewidth', 3)%xlabel('time');%ylabel('Displacement');hold…