diff --git a/SRI_matlab/main.m b/SRI_matlab/main.m index ac9f50d13a54bb2a9cb13d19d9acc2511e61dcdb..9064c7e25260df116b4dc204f9e49ee860ddc27e 100644 --- a/SRI_matlab/main.m +++ b/SRI_matlab/main.m @@ -1,22 +1,22 @@ clear figure S = 990; -I = 10; +I = 50; R = 0; n_pop = S + I + R; input = [S, I, R]; coeffs = options; -coeffs.InfectionRate = 0.06; -coeffs.ImmunisationRate = 0.01; +coeffs.InfectionRate = 0.09; +coeffs.ImmunisationRate = 0.005; coeffs.ImmunisationLossRate = 0.001; coeffs.VaccinationRate = 0.02; coeffs.DeathRate = 0.04; coeffs.NaturalDeathRate = 0.002; coeffs.NatalityRate = 0.003; -N = 30; +N = 1000; Slist = zeros(1, N); Ilist = zeros(1, N); @@ -28,7 +28,7 @@ for i=t Slist(i) = input(1); Ilist(i) = input(2); Rlist(i) = input(3); - input = step(input, coeffs) + input = step(input, coeffs); end % figure diff --git a/SRI_matlab/step.m b/SRI_matlab/step.m index 8cb17c9884d2df624f5e0d61f2fa5a865765ca3d..8e1f987ace602053be54af608cdcf175bf681a0d 100644 --- a/SRI_matlab/step.m +++ b/SRI_matlab/step.m @@ -5,7 +5,7 @@ R = X(3); 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; dR = options.ImmunisationRate * I + options.VaccinationRate * S - options.ImmunisationLossRate * R - options.NaturalDeathRate * R;