Reproducing results of paper gives inaccurate graph
Show older comments
I have a project that involves trying to reproduce the results of a paper. When I run CancerModel.m, I get a picture that looks like the one in the paper, but the values on the axes are off. I'm plotting cell kill rate vs. time of death, and the paper produces a much higher lifespan and a much lower optimal cell kill rate. I've checked my equation for accuracy, and they appear to be consistent. I used a value of beta (rate of cancer cell growth retardation) that corresponds to cells/day instead of cells/hour, to be consistent with the first graph in the paper, and the
if i > 4
endT(1, i+1) = te;
end
is to prevent errors (I don't know why they occur). If you remove that code, te (the time when the patient dies for each lambdaCt (cancer cell kill rate)) has no value for lambdaCt = 0 to 4. Also, complex numbers are appearing in x and te for no apparent reason.
Here are my three files:
CancerModel.m:
endT = zeros(1, 41);
allLambdaCt = [0:40]
for i = [0:40]
lambdaCt = i;
x0 = [1 0];
tspan = [0 19200];
xtot = x(1) + x(2);
options = odeset('Events', @critCells);
f = @(t, x) cancerEqs(t, x, lambdaCt);
[t,x,te,xe,ie] = ode45(f, tspan, x0, options);
x
te
if i > 4
endT(1, i+1) = te;
end
end
plot(allLambdaCt, endT);
cancerEqs.m:
function xprime = cancerEqs(t, x, lambdaCt)
%cancerEqs: Computes the derivatives involved in solving the system of equations modeling chemotherapy equations.
beta = 59.28 * 10^-4;
Ninf = 2 * 10^12;
tau1 = 10^-6;
tau2 = 10^-6;
xprime = [-beta * log((x(1) + x(2)) / Ninf) * (x(1) - lambdaCt * x(1) + tau2 * x(2) - tau1 * x(1)); -beta * log((x(1) + x(2)) / Ninf) * (x(2) + tau1 * x(1) - tau2 * x(2))];
critCells.m
function [value, isterminal, direction] = critCells(t,x);
% The event occurs when the number of cells increases through the critical level.
value = x(1) + x(2) - 5 * 10^11;
isterminal = 1;
direction = 0;
The paper is attached. I'm using the same equations and parameters.
What exactly is the problem?
EDIT: Using ode15s instead of ode45 produces a better survival time, but doesn't improve the optimal cell kill.
Accepted Answer
More Answers (1)
Sean de Wolski
on 21 Apr 2014
1 vote
Have you tried using ode15s rather than ode45? The presence of log in your function indicates the function could be stiff (as are some of the plots in the paper).
1 Comment
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!