| sirmod | R Documentation |
Gradient-function for the SIR model
sirmod(t, y, parameters)
t |
Implicit argument for time |
y |
A vector with initial values for the states |
parameters |
A vector with parameter values for the SIR system |
A list of gradients
require(deSolve)
times = seq(0, 26, by=1/10)
paras = c(mu = 0, N = 1, beta = 2, gamma = 1/2)
start = c(S=0.999, I=0.001, R = 0)
out=ode(start, times, sirmod, paras)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.