/* test of extracellular using 1 segment and current stimulus */
/* time constant .5 msec, initial jump 1mV steady state 2mv */

// physical properties of the cell
create a
{access a nseg=1 L=10 diam=10
	insert pas g_pas=1 cm=.5e3*g_pas e_pas=0
}
{insert extracellular xraxial=1e9 xg=1 xc=0}

// experimental tools
objref stim 
stim = new IClamp(.5)

// run parameters
tstop=2
stim.dur = 1
stim.amp = PI*diam*L/100

// graphical interface appearance
objref g
g = new Graph()
g.size(0,2,0,5)

/*{cm=0 g=1e9 xraxial=1e9 xc=.5e3} /* test of xc scale. note xc/xg=.5msec*/

// simulation control
proc run() {
	v = 0 vext=0
	t = 0
	g.beginline()
	g.addexpr("vext(.5)")
	while (t < tstop) {
		g.line(t, v(.5) + vext(.5))
		g.plot(t)
		fadvance()
	}
	g.flush()
}
// run simulation
run()
