
        format none;

        function xdot = f (x, t)
            # Zmena hodnoty x za jednotku casu
            xdot = zeros (35,1);
            xdot(5) = 0; # fixed, phase 
xdot(6) = 0; # fixed, Tj 
xdot(7) = 0; # fixed, Tc 
xdot(8) = 0; # fixed, Tp 
xdot(9) = 0; # fixed, theta1 
xdot(10) = 0; # fixed, theta0 
xdot(11) = 0; # fixed, Kb 
xdot(12) = 0; # fixed, k_ 
xdot(13) = 0; # fixed, Kil 
xdot(14) = 0; # fixed, Kl 
xdot(15) = 0; # fixed, lambda6 
xdot(16) = 0; # fixed, D_ 
xdot(17) = 0; # fixed, lambda5 
xdot(18) = 0; # fixed, gamma3 
xdot(19) = 0; # fixed, alpha3 
xdot(20) = 0; # fixed, alpha1 
xdot(21) = 0; # fixed, r5 
xdot(22) = 0; # fixed, r7 
xdot(23) = 0; # fixed, r4 
xdot(24) = 0; # fixed, r3 
xdot(25) = 0; # fixed, r2 
xdot(26) = 0; # fixed, r1 
xdot(27) = 0; # fixed, Cytosol 
xdot(4) = x(4) = mod((x(35)+6+x(5)),x(7)); # assignment, t2  FROM INIT EXPRESSION!!! 
xdot(1) = x(1) = x(10)+x(9)/2*((1+tanh(x(4)/x(6)))-(1+tanh((x(4)-x(8))/x(6)))+(1+tanh((x(4)-x(7))/x(6)))); # assignment, phi  FROM INIT EXPRESSION!!! 
xdot(2) = x(2) = 130/3/3; # assignment, I_  FROM INIT EXPRESSION!!! 
xdot(3) = x(3) = 130*exp(1)^(-1*(((mod((x(35)+6),24))-6)^2)/(2*2^2))/3; # assignment, Ir  FROM INIT EXPRESSION!!! 
xdot(30) = x(30) = x(34)*x(19); # assignment, Nf  FROM INIT EXPRESSION!!! 
xdot(28) = x(28) = x(30)+x(32); # assignment, Ntot  FROM INIT EXPRESSION!!! 
xdot(29) = x(29) = x(34)+x(33)+x(31); # assignment, Ctot  FROM INIT EXPRESSION!!! 
xdot(31) = x(23)*x(1)*x(34) - (x(22) + x(16))*x(31); # ode, Cnit 
xdot(32) = 2*x(26)*x(31) - (x(19)*x(24)*x(33)/x(30)+x(15)*x(26)*x(31)/x(30) + x(16))*x(32); # ode, Nr 
xdot(33) = x(25)*(x(3)/(x(3)+x(14)+x(2)*x(2)/x(13)))*x(34) - ((x(24)+x(24)*x(18))*x(32)/x(30) + x(21) + x(16))*x(33)- x(20)*x(26)*x(31) - x(17)*(x(25)*(x(3)/(x(3)+x(14)+x(2)*x(2)/x(13)))*x(34))/x(34)*x(31); # ode, Cr 
xdot(34) = x(24)*x(33)*x(32)/x(30) - (x(23)*x(1)+x(16))*x(34) + x(22)*x(31); # ode, Cf 
xdot(35) = 1; # ode, time 
xdot(1) = 0; # end
xdot(2) = 0; # end
xdot(3) = 0; # end
xdot(4) = 0; # end
xdot(28) = 0; # end
xdot(29) = 0; # end
xdot(30) = 0; # end

        endfunction

        # time scale
        t = linspace(0, 200, 2000);

        # default values
        x0 = zeros (35,1);
        x0(5) = 8; # fixed parameter, phase
x0(6) = 0.0001; # fixed parameter, Tj
x0(7) = 24; # fixed parameter, Tc
x0(8) = 6; # fixed parameter, Tp
x0(9) = 1; # fixed parameter, theta1
x0(10) = 0; # fixed parameter, theta0
x0(11) = 0.08; # fixed parameter, Kb
x0(12) = 0.27; # fixed parameter, k_
x0(13) = 4500; # fixed parameter, Kil
x0(14) = 55.5; # fixed parameter, Kl
x0(15) = 0.88; # fixed parameter, lambda6
x0(16) = 0.0083; # fixed parameter, D_
x0(17) = 5200; # fixed parameter, lambda5
x0(18) = 0.4; # fixed parameter, gamma3
x0(19) = 0.155; # fixed parameter, alpha3
x0(20) = 1.9; # fixed parameter, alpha1
x0(21) = 0.027; # fixed parameter, r5
x0(22) = 0.83; # fixed parameter, r7
x0(23) = 9.3e-4; # fixed parameter, r4
x0(24) = 0.023; # fixed parameter, r3
x0(25) = 0.275; # fixed parameter, r2
x0(26) = 14.5; # fixed parameter, r1
x0(27) = 1; # fixed compartment, Cytosol
x0(31) = 0; # fixed specie, Cnit
x0(32) = 100; # fixed specie, Nr
x0(33) = 100; # fixed specie, Cr
x0(34) = 650; # fixed specie, Cf
x0(35) = 0; # fixed specie, time
x0(4) = mod((x0(35)+6+x0(5)),x0(7)); # assignment parameter, t2
x0(1) = x0(10)+x0(9)/2*((1+tanh(x0(4)/x0(6)))-(1+tanh((x0(4)-x0(8))/x0(6)))+(1+tanh((x0(4)-x0(7))/x0(6)))); # assignment parameter, phi
x0(2) = 130/3/3; # assignment parameter, I_
x0(3) = 130*exp(1)^(-1*(((mod((x0(35)+6),24))-6)^2)/(2*2^2))/3; # assignment parameter, Ir
x0(30) = x0(34)*x0(19); # assignment specie, Nf
x0(28) = x0(30)+x0(32); # assignment specie, Ntot
x0(29) = x0(34)+x0(33)+x0(31); # assignment specie, Ctot


        #lsode_options ( 'absolute tolerance', max (50*eps, 0.5e-28) );
        lsode_options ( 'relative tolerance', max (50*eps, 0.5e-28) ); 

        y = lsode ("f", x0, t);
        
        for i = 1:length(t)
            y(i, 4) = mod((y(i, 35)+6+y(i, 5)),y(i, 7)); # assignment, t2  FROM INIT EXPRESSION!!! 
y(i, 1) = y(i, 10)+y(i, 9)/2*((1+tanh(y(i, 4)/y(i, 6)))-(1+tanh((y(i, 4)-y(i, 8))/y(i, 6)))+(1+tanh((y(i, 4)-y(i, 7))/y(i, 6)))); # assignment, phi  FROM INIT EXPRESSION!!! 
y(i, 2) = 130/3/3; # assignment, I_  FROM INIT EXPRESSION!!! 
y(i, 3) = 130*exp(1)^(-1*(((mod((y(i, 35)+6),24))-6)^2)/(2*2^2))/3; # assignment, Ir  FROM INIT EXPRESSION!!! 
y(i, 30) = y(i, 34)*y(i, 19); # assignment, Nf  FROM INIT EXPRESSION!!! 
y(i, 28) = y(i, 30)+y(i, 32); # assignment, Ntot  FROM INIT EXPRESSION!!! 
y(i, 29) = y(i, 34)+y(i, 33)+y(i, 31); # assignment, Ctot  FROM INIT EXPRESSION!!! 

        endfor
        
        [t',y]
        