Displaying 1 result from an estimated 1 matches for "phiy".
Did you mean:
phi
2004 Sep 06
1
A naive lsoda question....
..., like say, phix <- 0.7 +
runif(tmax) in the example below.
# defining function
lotvol <- function(t,n,p){
x <- n[1]; y <- n[2]
rx <- p["rx"]; ry <- p["ry"]
Kx <- p["Kx"]; Ky <- p["Ky"]
phix <- p["phix"]; phiy <- p["phiy"]
dx.dt <- rx*x*(1 - x/Kx) - phix*x*y
dy.dt <- ry*y*(1 - y/Ky) - phiy*x*y
list(c(dx.dt, dy.dt))
}
# running lsoda
nstart <- c(x=0.5, y=0.5)
parms <- c(rx=1, ry=1, Kx=1, Ky=1, phix=1.2, phiy=0.8)
tmax <- 100
times <- seq(0,tmax)
require(odesolve...