tests/testthat/helper-discrete.R

logistic_map <- function(r, y, t) {
  ret <- matrix(0, t + 1, length(y))
  ret[1, ] <- y
  for (i in seq_len(t)) {
    ret[i + 1, ] <- y <- r * y * (1 - y)
  }
  ret
}

Try the odin package in your browser

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

odin documentation built on Oct. 2, 2023, 5:07 p.m.