First run of simulation acting differently
Posted: Tue Feb 07, 2012 6:41 pm
I'm having a lot of trouble understanding why the first run of this loop is producing different results than the subsequent runs, the issue seems to come up when there's a single fadvance() after the initialization and the SEClamp is somewhat configured. I can't really understand what I'm doing wrong.
Outputs
Code: Select all
dt=0.1
create soma
access soma
soma {
nseg = 1
diatstop = i
L = 20
diam=20
Ra = 150
insert hh
ek = -103
insert pas
g_pas = 0.00003334
}
objectvar stim
soma stim = new SEClamp(0.5)
tstop = 200
finitialize(-110)
stim.dur1 = 50
//stim.dur2 = 400 // Uncomment this line and the issue goes away
stim.amp1 = -110
stim.amp2 = -40
fadvance()
for i=0,2 {
print "Run ", i
finitialize(-110)
stim.dur1 = 50
stim.dur2 = 400
stim.amp1 = -110
stim.amp2 = -40
while (t < tstop) {
if (t > tstop - .2) {
print soma.v, stim.amp2
}
fadvance()
}
}
Code: Select all
Run 0
-69.484068 -40
-69.484068 -40
Run 1
-43.717401 -40
-43.717401 -40
Run 2
-43.717401 -40
-43.717401 -40