R/SIR.R

Defines functions SIR

Documented in SIR

SIR <- function(t, y, parameters){
  x <- y[1]
  y <- y[2]
  beta <- parameters[1]
  nu   <- parameters[2]
  dy    <- numeric(2)
  dy[1] <- -beta*x*y
  dy[2] <- beta*x*y - nu*y
  list(dy)
}

Try the phaseR package in your browser

Any scripts or data that you put into this service are public.

phaseR documentation built on May 29, 2017, 6:59 p.m.