# qif-noise.ode
# noisy qif that keeps track of spike times and ISI
@ meth=euler,bound=100000000
# noise 
wiener w
par sig=.1
par i=.1
par vhit=20,vreset=-5
par maxcount=1000.05
v'=v^2+i + sig * w
isi'=0
count'=0
tlast'=0
# when v spikes, reset, compute isi, update tlast, output
global 1 v-vhit {v=vreset;isi=t-tlast;tlast=t;count=count+1;out_put=1}
# when 1000 are computed stop!
global 1 count-maxcount {arret=1}
@ total=8000,trans=50000
# set plot
@ xp=count,yp=isi,xlo=0,xhi=1000,ylo=0,yhi=100
done

