Pendulum
Objective: https://www.youtube.com/watch?v=ZYR4IDBQOds&feature=youtu.be %calling a function function [dtheta_dt] = pendulum_ode_solver( t, theta) g = 9.81; l = 1.5; m = 0.5; w = g/(l*m); theta1 = theta(1); theta2 = theta(2); dtheta1_dt = theta2; dtheta2_dt = -w*w*sin(theta1); dtheta_dt = [dtheta1_dt;dtheta2_dt]; end clear…