Hi Tjun Kat,
you can define variables outside the ode function, but normally NOT
state variables, because their values need to be updated by the solver
during the simulation process.
But, if you want to block this for any debugging purposes and want to
e.g. fix a derivative to a certain valu
This is applicable to either using optim or the differential equation
solver or any similar solver
Suppose I want to use the differential equation solver and this is my code
d<-y[2]
vdpol<-function(t,y)
{
list(c(1,
d,
3,
4
)
}
stiff<-ode(y=rep(0,4),times=c(0,1),func
2 matches
Mail list logo