Skip to content
Prev 326414 / 398502 Next

R and MatLab implementations of the same model differs

On 05-07-2013, at 17:37, Jannetta Steyn <jannetta at henning.org> wrote:

            
You must make the parms vector a named vector because the with(.. in your function ST is not using the global values for those entities available in the global environment.

You can check this by inserting this line after the line with times =  and before the line out <- ode(?

rm(list=c("ENa_axon_AB","EK_axon_AB","ELeak_axon_AB","gNa_axon_AB","gK_axon_AB","gLeak_axon_AB","C_axon_AB"))

You will get an error.

So create the parms vector like this

parms =
c(ENa_axon_AB=ENa_axon_AB,EK_axon_AB=EK_axon_AB,ELeak_axon_AB=ELeak_axon_AB,gNa_axon_AB=gNa_axon_AB,
    gK_axon_AB=gK_axon_AB,gLeak_axon_AB=gLeak_axon_AB,C_axon_AB=C_axon_AB)

or better

parms <- c(ENa_axon_AB=50,EK_axon_AB=-80,ELeak_axon_AB=-60,gNa_axon_AB=300e-3,
                  gK_axon_AB=52.5e-3,gLeak_axon_AB=0.0018e-3,C_axon_AB=1.5e-3)

and remove the expressions with the separate assignments to the variables.


And use <- !!

Berend