g1 = 0.18;
g2 = 0.02;  %real parameters
g3 = 0.23;
np=3;       %number of parameters
ne=4;       %number of equations
sdev=0.2;
x0=12;
y0=12;
z0=0;
w0=0;
t0=0;
t1=10;
step=2100;
obs=15;     %observations minus one
h=(t1-t0)/step;
res=step/obs;
stuv=zeros(obs+1,ne);

% === ODE's method =========
[t,x] = ode45(@zeq,[t0:h:t1],[x0 y0 z0 w0],[],g1,g2,g3);
plot(t,x(:,1),'-',t,x(:,2),':',t,x(:,3),'-.',t,x(:,4),'--','linewidth',2);
title('Enzyme-kinetic reaction');
ylabel('concentration of proteins [uM]'), xlabel('reaction time [sec]');
legend('Substrate','Enzyme','Complex','Product');

noise=normrnd(0,sdev,step+1,ne);
xobs=x+noise;


for i=1:obs+1
    stuv(i,:)=xobs(1+res*(i-1),:);
    real(i,:)=x(1+res*(i-1),:);
end;

mod=zeros(obs+1,4);
