ode45 keeps giving me the error shown below.
Afficher commentaires plus anciens
I keep getting these errors shown below when I try to run my file.
Error in ode45 (line 107)
odearguments(odeIsFuncHandle,odeTreatAsMFile, solver_name, ode, tspan, y0, options, varargin);
Error in BMEN3010_Problem16_4 (line 16)
[YSol,tSol] = ode45(@odefun,tspan,Ca0); %Solution for Ca
File:
a = 0.459;
lambda1 = 1.11*10^(-2); %units min^-1
lambda2 = 1.38*10^(-4); %units min^-1
Cp0 = 100; %units nM
t = 0:7200; %units min due to lambdas
%input parameters, then solve ODE for Ca
G0 = 100; %units nM
Ka = 10^-9*10^9; %units nM^-1
phi = 0.243; %unitless, fraction of tumor volume that is interstitial fluid - where antibody exists
k = 0.5; %units µL*g^-1*min^-1
ke = 0.8; %same units as k
Cp = Cp0*(a*exp(-lambda1.*t)+(1-a)*exp(-lambda2.*t));
plot(t,Cp)
Ca0 = 0; %initial condition
tspan = [0,7200];
[YSol,tSol] = ode45(@odefun,tspan,Ca0); %Solution for Ca
hold on
plot(tSol,YSol)
function dYdt = odefun(t,Y)
G0 = 100;
phi = 0.243;
k = 0.5;
ke = 0.8;
rho = 10^-3;
Cp = Cp0*(a*exp(-lambda1.*t)+(1-a)*exp(-lambda2.*t));
dYdt = rho*(k/phi.*Cp-ke*Y)/(1+ka*G0/(1+ka*Y)+ka*G0*Y/(1+ka*Y)^2);
end
1 commentaire
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Ordinary Differential Equations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
