% script file for solving concentrationsODE as a differential equation
clear all;
global k1 k2 k3 k4 km d1 d2 n; %Declare all parameters global

k1 = input('On rate for LacI-IPTG binding '); %requests input for k1
k2 = input('Off rate for LacI-IPTG binding ');
k3 = input('Rate of constitutive expression of LacI '); %requests input for k1
k4 = input('Maximum transcription rate of GFP ');
km = input('Binding costant LacI-promoter ');
d1 = input('Degradation rate LacI ');
d2 = input('Degradation rate GFP ');
n = input('Hill coefficient LacI-promoter binding ');
initIPTG = input('initial concentration of IPTG ');
time = input('Number of timepoints ');
[t,y] = ode45(@concentrationsODE,[0 time],[initIPTG;0;0;0]);
plot(t,y(:,1),t,y(:,2),t,y(:,3),t,y(:,4))
legend('[IPTG]','[LacI]','[IPTG-LacI complex]','[GFP]','location','Best')
title('Inducible GFP expression ')
xlabel('time')
ylabel('amount')