search for: yd2

Displaying 2 results from an estimated 2 matches for "yd2".

Did you mean: d2
2006 Nov 29
2
How to solve differential equations with a delay (time lag)?
...pecify the delay term using the syntax allowed by odesolve. Here is an example of the kind of problem that I am trying to solve: > library(odesolve) yprime <- function(t, y, p) { # this function yd1 <- p["k1"] *(t <= p["T"]) - p["k2"] * y[2] yd2 <- p["k3"] * y[1](t - p["delay"]) - p["k4"] * y[2] # this is not syntactically valid, but it is what I would like to do list(c(yd1,yd2)) } times <- seq(0,30,by=0.1) y0 <- c(0,0) parms <- c(k1=0.7, k2=0.5, k3=0.2, k4=0.8, T=10, delay=5) Is there...
2004 Jun 14
1
olesolve: stepsize
...t;ki"]*p["vi"])) # G1(t)-y(1); G2(t)-y(2);I(t)-y(3); X(t)-y(4) yd1 <- (abs(t) + p["hgo0"] - (p["kl"] + p["fx"]*y[4])*y[1]*p["vg"] + p["k12"]*y[2])/p["vg"] - (p["k21"] + p["k01"])*y[1] yd2 <- p["k21"]*y[1]*p["vg"] - (p["k12"] + p["k02"] + (1-p["fx"])*y[4])*y[2] yd3 <- (1-p["f"])*s(t)*p["kg"]*y[1]/p["vi"] - p["ki"]*y[3] yd4 <- -p["p2"]*y[4] + p["p3"]*(y[3]...