I have a problem simulating the first equations of this article https://www.sciencedirect.com/science/article/pii/S2468042717300039#bib48
I need to solve it using the given parameters below the first graphics (fig.2).
I'been trying to solve the equations with ode23 with the same parameters and nothing.
Where should i start...

 Risposta accettata

Ameer Hamza
Ameer Hamza il 6 Nov 2020
Modificato: Ameer Hamza il 6 Nov 2020
You can use ode45(). Following code plot one set of results from the paper
IC = [1e6; 0; 1e-6];
tspan = [0 30];
[t, X] = ode45(@odefun, tspan, IC);
T = X(:,1);
I = X(:,2);
V = X(:,3);
figure();
subplot(2,1,1);
semilogy(t, V, 'r');
ylim([1e2 1e8])
subplot(2,1,2);
semilogy(t, I, 'b--');
hold on
semilogy(t, T, 'b-');
ylim([1e2 1e6])
function dXdt = odefun(t, X)
s = 10000;
d = 0.01;
beta = 1e-6;
rho = 1;
p = 1200;
c = 23;
T = X(1);
I = X(2);
V = X(3);
dTdt = s-d*T-beta*T*V;
dIdt = beta*T*V-rho*I;
dVdt = p*I-c*V;
dXdt = [dTdt; dIdt; dVdt];
end

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by