search for: sigimp

Displaying 1 result from an estimated 1 matches for "sigimp".

Did you mean: sigiml
2009 Jun 12
2
External signal in ODE written in C (using deSolve and approx1?)
...ine. However I have not yet managed to use forcing functions in C code. In pure R code this works very well with approxfun() specified outside the model: ############################################### #Model lvml <- function(t, x, parms) { with(as.list(c(parms, x)), { import <- sigimp(t) dS <- import - b*S*P + g*K #substrate dP <- c*S*P - d*K*P #producer dK <- e*P*K - f*K #consumer res <- c(dS, dP, dK) list(res) }) } ## Parameters parms <- c(b = 0.0, c = 0.1, d = 0.1, e = 0...