%this mfile shows an example of how to use Matlab's built in differential %equation solver to solve the system of ode's stored in 'diff_eq.m'. You %will have to modify this to suit your needs for this project. clear all close all clc k=2; m=1; a=0; [t,y]=ode45(@diff_eq,[0,50],[0;.5],[],m,k,a); plot(t,y) xlabel('time') ylabel('pos and vel') legend('pos(t)','vel(t)') figure plot(y(:,1),y(:,2)) xlabel('pos') ylabel('vel')