% Simple model of a genetic switch

% This function implements the basic model of the genetic switch
% Parameters taken from Gardner, Cantor and Collins, Nature, 2000

function dydt = geneticswitch(t, y, options, mu, n)

if (nargin < 4) mu = 4; end;
if (nargin < 5) n = 2; end;

% Extract protein concentrations
z1 = y(1);
z2 = y(2);

dydt(1,:) = mu / (1 + z2^n) - z1;
dydt(2,:) = mu / (1 + z1^n) - z2;

