Need help to solve 5 simultaneous first order differential equations with Initial Condition.
Ältere Kommentare anzeigen
I have to solve following first order ordinary differential equations and plot the values of Concentrations (Cmn, Cecm, Crec, Ccirc, Ccells) against time (t).

where value of r(t) is described as following.

Below is my script, but I am getting constant errors. or something i dont understand.
clc; close; clear;
%Constant Parameters
Cmn0 = 6.2E-6; %Initial conc at the MN (
tr = 1805; %release period (s)
ka = 5.01E6; %Association rate (in 1/s)
kd = 5E-4; %Dissociation rate (in 1/s)
ki = 5.05E-3; %Internalization rate (in 1/s)
kc = 5E-3; %Circulation uptake rate (in 1/s)
Rtot = 1.85E-6 ; %initial receptor concentration (in umol/mm^3)
syms r(t) C_mn(t) C_ecm(t) C_rec(t) C_circ(t) C_cells(t) %creating symbolic variable
ode1 = diff(r) == Cmn0/tr;
ode2 = diff(C_mn) == -r;
ode3 = diff(C_ecm) == r- (ka * C_ecm * (Rtot - C_rec - C_cells)) + kd * C_rec - kc * C_ecm;
ode4 = diff(C_rec) == (ka * C_ecm * (Rtot - C_rec - C_cells)) - ((kd + ki)* C_rec);
ode5 = diff(C_circ) == kc * C_ecm;
ode6 = diff(C_cells) == ki * C_rec;
odes = [ode1; ode2; ode3; ode4; ode5; ode6]
cond1 = r(0) == Cmn0/tr;
cond2 = C_mn(0) == 6.2E-6;
cond3 = C_ecm(0) == 0;
cond4 = C_rec(0) == 0;
cond5 = C_circ(0) == 0;
cond6 = C_cells(0) == 0;
conds = [cond1; cond2; cond3; cond4; cond5; cond6];
[VF,Sbs] = odeToVectorField(odes);
odsefcn = matlabFunction(VF,'File', 'Consolvefun')
[t, C] = ode45(@Consolvefun, [0 5000], conds);
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Numeric Solvers finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!