Displaying 3 results from an estimated 3 matches for "db_2".
Did you mean:
db2
2011 Sep 02
1
Using capture.output within a function
...;- c( b_1 = 0,
b_2 = 0,
a = 0)
#declaring ODEs
Kristian <-function(t, state, w){
with(as.list(c(state, w)),
{
db_1 = -((w[1]+w[8])*b_1+(w[2]+w[6]*w[8]
+w[7]*w[9])*b_2+0.5*(b_1)^2+w[6]*b_1*b_2+0.5*
((w[6])^2+(w[7])^2)*(b_2)^2)
db_2 = -w[3]*b_2+1
da = w[1]*w[4]*b_1+(w[2]*w[4]+w[3]*w[5])*b_2
list(c(db_1, db_2, da))
})
}
# time making a sequence from t to T evaluated at each delta seq(t, T,
by = delta)
times <- seq(0, 10, by = 0.5)
outmat <- ode(y = state, times = times, func = Kri...
2011 Apr 28
1
DLSODA error
...a = 0)
#declaring ODEs
Kristian <- function(t, state, parameters){
with(as.list(c(state, parameters)),
{
db_1 = -((K_vv+lambda_v)*b_1+(K_rv+Sigma_rv*lambda_v
+Sigma_rr*lambda_r)*b_2+0.5*(b_1)^2+Sigma_rv*b_1*b_2+0.5*
((Sigma_rv)^2+(Sigma_rr)^2)*(b_2)^2 )
db_2 = -K_rr*b_2+1
da = K_vv*theta_v*b_1+(K_rv*theta_v+K_rr*theta_r)*b_2
list(c(db_1, db_2, da))
})
}
# time making a sequence from t to T evaluated at each delta seq(t, T,
by = delta)
times <- seq(0, 10, by = 0.5)
outmat <- ode(y = state, times = times, f...
2011 Mar 31
0
dfsane arguments
...b_1 = 0,
b_2 = 0,
a = 0)
Kristian <- function(t, state, parameters){
with(as.list(c(state, parameters)),{
db_1 =
-((K_vv+lambda_v)*b_1+(K_rv+Sigma_rv*lambda_v+Sigma_rr*lambda_r)*b_2+0.5*(b_1)^2+Sigma_rv*b_1*b_2+0.5*((Sigma_rv)^2+(Sigma_rr)^2)*(b_2)^2
)
db_2 = -K_rr*b_2+1
da = K_vv*theta_v*b_1+(K_rv*theta_v+K_rr*theta_r)*b_2
})
}
times <- seq(0, 10, by = 0.5)
library(deSolve)
out <- ode(y = state, times = times, func = Kristian, parms = parameters)
# constructing output as a matrix
outmat <- as.matrix(out)
library(BB) #...