%% Define model parameters

doublingTime = 2; % generation time

degRate = log(2)/doublingTime; % protein degradation rate (only due to cell doubling)

proRate = 3*degRate; % protein production rate

Yst = proRate/degRate; % protein (y) steady state

%% Calculate protein dynamics

time = [0:0.2:8]; % define a vector of time points (in hours)

y1 = Yst*(1-exp(-degRate.*time)); % Gene induction - calculate protein level (y) as a function of time (t).

y2 = Yst*(exp(-degRate.*time)); % Gene repression - calculate protein level (y) as a function of time (t).

%% Plot the dynamics

figure; hold on;

plot(time,y1,'.b');

plot(time,y2,'.r');

grid on;

%% Some open questions

% 1) what is the response time Tao?

% 2) what is the response time and protein steady-state if the production rate is doubled?

% 3) what is the response time and protein steady-state if the degg rate is doubled?

% 4) What can an organism do if its need a faster response time gene (but still maintain a steady state level of 1)?