Displaying 1 result from an estimated 1 matches for "lsexamp".
Did you mean:
examp
2004 Jun 10
0
lsoda with arbitrary zero thresholds (with psuedo-solution)
...> problematic in difficult systems.
> Borrowing from the lsoda example again I once again highlight the code
> that I have changed to put in place arbitrary thresholds:
> parms <- c(k1=0.04, k2=1e4, k3=3e7)
> my.atol <- c(1e-6, 1e-10, 1e-6)
> times <- seq(0,1000)
> lsexamp <- function(t, y, p)
> {
> if(y[1] < .4) yd1 <- -y[1] ### These if, else statements are new
> else yd1 <- -p["k1"] * y[1] + p["k2"] * y[2]*y[3]
> if(y[3] < .4) yd3 <- -y[3] ### These if,else statements are new
> else yd3...