Re: [R] Defining a variable outside of optim or differential equation solver.

2012-07-20 Thread Thomas Petzoldt
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

[R] Defining a variable outside of optim or differential equation solver.

2012-07-17 Thread Tjun Kiat Teo
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 ) }