matlab programme for simple pendulum
Objective: clear;close all;clc % Week 2 Solving 2nd order ODE using MATLAB g = 9.81; % Acceleration of gravity l = 1; % Length of Pendalum m = 0.1; % Masss of Pendalum r=0.1; % Radius of Pendalum % Initial Conditions theta_0 = [0;5]; % Time Points t_span = linspace(0,2,100); % Compute Natural Frequency omega=g/(l*m); % Solve ODE…