pendulam programing
Objective: function xdot =lsode_pendulam(x,t); % parameter ,gravity, pendulam lenght ,mass of the bob m=0.5 ; l=0.613; g=9.81; xdot=zeros(2,1); % defining the theta xdot(1)=x(2); % pendulam equation xdot(2)=-(g/l*m)^2*sin(x(1)); end clear all close all clc % solving second order pendulam ode_test % parameters t=linspace(0,5,20);…