// make current vs firing rate curve

objref frequency, plot1

sweeps=100
range=.8

proc makeif() {

// turn off input pulse
input.start=100000
tstop=2500

frequency = new Vector()
plot1 = new Graph()

for a=0, sweeps {
	Iinject.amp=a*range/sweeps
	init()
	run()
	
	l=spikesouttimes.size()
	if (l>0) {last=spikesouttimes.x[l-1]} else {last=0}
	if (l>0 && last>200) {
		isistationary=spikesouttimes.x[l-1]-spikesouttimes.x[l-2]
		frequency.append(1/isistationary*1000)
		} else {
		frequency.append(0)
		}
}

 frequency.plot(plot1, 1)
 
 }