% geneticswitch_plot.m - run the Collins genetic switch model
% RMM, 24 Jan 07

aminit;					% initialize MATLAB

sol1 = ode45(@geneticswitch, [0 10000], [10 0]);
sol2 = ode45(@geneticswitch, [0 10000], [10 40]);

figure(1); clf;
  phaseplot('geneticswitch', ...
    [0 100 10], [0 100 10], ...
    boxgrid([0 100, 6], [0, 100, 6]), 40000 ...
  );

  title('Collins genetic switch (ala MIT SBC)')
  xlabel('cI (# molecules)');
  ylabel('lacI (# molecules)', 'Rotation', 90);

figure(2); clf;
  plot(sol1.x/60, sol1.y(1,:), sol1.x/60, sol1.y(2,:));  hold on;
  plot(sol2.x/60, sol2.y(1,:), sol2.x/60, sol2.y(2,:));

  title('Collins genetic switch (ala MIT SBC)')
  xlabel('time (min)');
  ylabel('Protein concentration (# molecules)');
  legend('cI', 'lacI');

