clear all 


% This is the main function for problem 2 HW 1


% Time span to run simulation 
tspan = [0, 500] 

% Initial mRNA and protein concentration 
r0 = [0; 0]
 
figure(1)

% Call to the ODE function closed loop (with negative feedback) 
[t,x] = ode45(@toggle, tspan, r0, []) 

plot(t, x(:,1), '-r', t, x(:,2), '-k')
legend('X', 'Y')
xlabel('time in min') 
ylabel('concentration in number per cell')

