Motion of an Undamped Simple Pendulum
Objective: Script 1 %ode_function function [dtheta_dt] = ode_func(t,theta, l, m, g) theta1 = theta(1); theta2 = theta(2); dtheta1_dt = theta2; dtheta2_dt = -(g/l)*sin(theta1); dtheta_dt = [dtheta1_dt; dtheta2_dt]; end Script 2 %motion of the pendulum close all; clear all; clc; %inputs of the pendulum problem %g = gravity g…