solving ode function
Objective: solving above 2nd ODE equation % calling fuction function [dx_dt] = ode_function(t,x,k,m,c) d_r = c/2*(k*m)^0.5; w0 = (k/m)^0.5 ;x1 = x(1) x2 = x(2) dx1_dt = x2; dx2_dt = -2*d_r*w0*x2-(w0^2*x1); dx_dt = [dx1_dt;dx2_dt]; end clear all close all clc % inputs k = 0.5; m = 0.1; c = 1; % initial conditions x_0…