// multiple spikes

// see prev mdbeta_s.hocs for alt codes

load_file("nrngui.hoc")



load_file("sbeta_jcns.hoc")

///////////////////////////////////////////////////////


createAxon()

proc setupPhysiology() {
	setRacm()
	addchannels()
}



bursts = 1

spikesperburst = 9


//totalspikes = bursts*spikesperburst

totalspikes = 20

objref stim[totalspikes]

spikeinterval= 14

stimcounter = 1

tdelay = 25

burstinterval = 400

proc setupStim() {

for x = 1, bursts {
	for y = 1, spikesperburst {
	 
	node[79] {

		stim[stimcounter] = new IClamp(0.5)
		stim[stimcounter].del = (x-1)*burstinterval + (y-1)*spikeinterval + tdelay
		stim[stimcounter].amp = 0.5
		stim[stimcounter].dur = 0.7
                tstop = 300
		stimcounter = stimcounter +1


			}
		}
	}
 }





////////////////////////////////////////////////////////

setupPhysiology()
setupStim()

////////////////////////////////////////////////////////

access soma

init()