function dx = harmonic_oscillator(t,X) %input parameters: time and the states
%times has to be a scalar
%state has to be a Nx1 vector

%output: the derivatives Nx1 vector


%implements the differential equation of a harmonic oscillator

%we can put previously our parameters into 'Params'
%and later use this in this function
%this way we do not have to alter the syntax of the sovler, however this is not a nice solution :(

dx=zeros(2,1);

dx(1)=X(2);
dx(2)=-X(1);

