Skip to content
Snippets Groups Projects
Commit 3fd5b168 authored by Paul CACHEUX's avatar Paul CACHEUX
Browse files

Ajout d'un *N sur le NatalityRate et remise du programme dans un etat utilisable

parent 07e3b7e5
No related branches found
No related tags found
No related merge requests found
clear figure clear figure
S = 990; S = 990;
I = 10; I = 50;
R = 0; R = 0;
n_pop = S + I + R; n_pop = S + I + R;
input = [S, I, R]; input = [S, I, R];
coeffs = options; coeffs = options;
coeffs.InfectionRate = 0.06; coeffs.InfectionRate = 0.09;
coeffs.ImmunisationRate = 0.01; coeffs.ImmunisationRate = 0.005;
coeffs.ImmunisationLossRate = 0.001; coeffs.ImmunisationLossRate = 0.001;
coeffs.VaccinationRate = 0.02; coeffs.VaccinationRate = 0.02;
coeffs.DeathRate = 0.04; coeffs.DeathRate = 0.04;
coeffs.NaturalDeathRate = 0.002; coeffs.NaturalDeathRate = 0.002;
coeffs.NatalityRate = 0.003; coeffs.NatalityRate = 0.003;
N = 30; N = 1000;
Slist = zeros(1, N); Slist = zeros(1, N);
Ilist = zeros(1, N); Ilist = zeros(1, N);
...@@ -28,7 +28,7 @@ for i=t ...@@ -28,7 +28,7 @@ for i=t
Slist(i) = input(1); Slist(i) = input(1);
Ilist(i) = input(2); Ilist(i) = input(2);
Rlist(i) = input(3); Rlist(i) = input(3);
input = step(input, coeffs) input = step(input, coeffs);
end end
% figure % figure
......
...@@ -5,7 +5,7 @@ R = X(3); ...@@ -5,7 +5,7 @@ R = X(3);
N = S + I + R; N = S + I + R;
dS = -options.InfectionRate * S * I/N - options.VaccinationRate * S + options.ImmunisationLossRate * R + options.NatalityRate - options.NaturalDeathRate * S; dS = -options.InfectionRate * S * I/N - options.VaccinationRate * S + options.ImmunisationLossRate * R + options.NatalityRate * N - options.NaturalDeathRate * S;
dI = options.InfectionRate * S * I/N - options.ImmunisationRate * I - options.DeathRate * I; dI = options.InfectionRate * S * I/N - options.ImmunisationRate * I - options.DeathRate * I;
dR = options.ImmunisationRate * I + options.VaccinationRate * S - options.ImmunisationLossRate * R - options.NaturalDeathRate * R; dR = options.ImmunisationRate * I + options.VaccinationRate * S - options.ImmunisationLossRate * R - options.NaturalDeathRate * R;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment