0
votes

I need to model negative, positive and simple regulation of a gene for my systems biology class using MATLAB. The problem is that the functions for negative and simple regulation work but the positive regulation function is only outputting zeros.

My script is as follows:

% Simulation of simple regulation, negative autoregulation and positive
% autoregulation

% Define constants
global a b K n 
a = 1;
b = 1;
K = 0.5;
n = 2; % Hill coefficient


% Simulation time
tspan = [0,10];

% Initial condition
X0 = 0;

% Run simulations
[t1,X1] = ode45(@autoregulation_f0,tspan,X0); % Simple regulation
[t2,X2] = ode45(@autoregulation_f1,tspan,X0); % Negative autoregulation
[t3,X3] = ode23(@autoregulation_f2,tspan,X0); % Positive autoregulation
% Plot results
figure;
plot(t1,X1,t2,X2,t3,X3);
legend('simple','negative','Location','southeast');

And my functions are:

function dxdt = autoregulation_f0(t,X)
    global a b
    dxdt = b - a*X;
end


function dxdt = autoregulation_f1(t,X)
    global a b K n
    dxdt = b/(1+(X^n)/(K^n)) - a*X;
end

function dxdt = autoregulation_f2(t,X)
    global a b K n 
    dxdt = b*X.^n./(K.^n+X.^n) + a*X;
end

The third function "autoregulation_f2(t,X)" is the one that outputs zeros and therefore when plotting the graph I just get a straight line.

Does anyone know what could be causing this?

Thanks in advance!

1

1 Answers

1
votes

It looks to be the correct result for the given function. Your provided dxdt has an X in every term. The initial X0=0 will result in dxdt=0, giving you no change in X. As a result you just end up with a flat line.