Skip to content
Snippets Groups Projects
Commit 7d5be0d7 authored by Rivnyák Tímea's avatar Rivnyák Tímea
Browse files

deriv function for SIRC

parent f7484fc8
Branches
No related tags found
No related merge requests found
deriv.m 0 → 100644
function dydt = deriv(y, nu, mu, epsilon, beta, gamma, Gamma, q)
S = y(1);
I = y(2);
R = y(3);
C = y(4);
dSdt = nu - (beta*I + epsilon*beta*C)*S - mu*S;
dIdt = (beta*I + epsilon*beta*C)*S - gamma*I - mu*I;
dRdt = gamma*(1-q)*I + Gamma*C - mu*R;
dCdt = gamma*q*I - Gamma*C - mu*C;
dydt = [dSdt; dIdt; dRdt; dCdt];
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment