Solving Ordinary Differential Equations-Simple Pendulum
Objective: Video @ https://youtu.be/zVI0960uRGw (1) function [dtheta_dt]= ode_func(t,theta,w) theta1=theta(1) theta2=theta(2) dtheta1_dt=theta2; dtheta2_dt=-(w*w)*sin(theta1); dtheta_dt=[dtheta1_dt;dtheta2_dt]; end (2) %sp clear all close all clc g=9.81; l=1; m=0.1; w=g/(l*m); theta_a=[0;1]; t_span = linspace(0,1,500); [t,results]=ode45(@(t,theta)…