Here is my code. I cannot make it run. Yes I am pretty new to the subject.

Is there some obvious error in the code?

Any help appreciated

clear; clc; close all;

global k1 k2 k3 k4 k5 K n

tmin=0; tmax=1.5;

S0=[0; 0];

params=[20, 5, 5,5,2,1,4;

10,4,5,5,3,1,3;

20,5,5,2,2,2,3];

function

for i=1:3

k1=params(i,1); k2=params(i,2); k3=params(i,3);

k4=params(i,4); k5=params(i,5); K=params(i,6) ; n=params(i,7);

[t,S] = ode45(@dsdt,[tmin tmax],S0);

S1=S(:,1);

S2=S(: , 2) ;

endfunction

figure %i set timwn

plot(t,S1,t,S2,’–’)

xlabel(‘time’)

ylabel(‘S’)

legend(‘S1’,‘S2’)

title(“k1=”+k1+", k2="+k2+", k3="+k3+", k4="+k4+", k5="+k5+", K="+K+", n="+n)

end

figure

for i=1:3 % Sxediazw xwro phasewn gia 3 set timwn

k1=params(i,1); k2=params(i,2); k3=params(i,3);

k4=params(i,4); k5=params(i,5); K=params(i,6) ; n=params(i,7);

[t,S] = ode45(@dsdt,[tmin tmax],S0);

S1=S(:,1);

S2=S(: , 2) ;

plot(S1,S2)

hold on

end

hold off

xlabel(‘S1’)

ylabel(‘S2’)

title(‘Phase Space’)

legend(‘1st set’, ‘2nd set’, ‘3d set’)

function Sdot=dsdt(t,S)

global k1 k2 k3 k4 k5 K n

s1=S(1);

s2=S(2);

sdot1=k1/(1+(s2/K)^n )-(k3+k5)*s1;
sdot2=k5*s1-k4*s2+k2;

Sdot=[sdot1;sdot2];

end