clear all;
clc;
close all;
%just for sure







InitState=[-3 5];
%initial state of the differential equation


%options for the numerical solver e.g. Relative, absolute tolarence etc...
options = odeset('RelTol',1.0E-1,'AbsTol', 1.0E-1,'MaxStep', 1.0E-1);

%time of numerical integration
Max_time=30;

[t,X] = ode45('harmonic_oscillator',[0 Max_time],InitState);

%options can be used as:
%[t,X] = ode45('harmonic_oscillator',[0 Max_time],InitState,options);
%you can use other solver as well
%[t,X] = ode23('harmonic_oscillator',[0 Max_time],InitState)

len=1:size(X(:,1),1);
plot(len,X(:,1),len,X(:,2))
