1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
xopen("$(NEURONHOME)/lib/hoc/noload.hoc")
proc advance() {
batch_run(t+1, 1)
print t
}
cvode.debug_event(1)
begintemplate Cell
public soma, connect_pre, nclist, syn
create soma
objref nclist, syn
proc init() {
nclist = new List()
create soma
soma {
nseg=10
L=10
diam = 100/(PI*L)
insert hh
syn = new ExpSyn(0)
}
}
proc connect_pre() {// arg is presynaptic Cell
$o1.soma nclist.append( new NetCon(&v(1), syn, -20, 1, .002))
}
endtemplate Cell
ncell = 100
objref cell[ncell]
for i=0, ncell - 1 {
cell[i] = new Cell()
}
access cell[0].soma
for i=1, ncell-1 {
cell[i].connect_pre(cell[i-1])
}
xopen("line.ses")
nplt = 15
objref vx[nplt], vy[nplt], g
for i=0,nplt-1 {
vx[i] = new Vector() vy[i] = new Vector()
cvode.record(&Cell[i].soma.v(.5), vy[i], vx[i])
}
proc p() {local i
g = new Graph()
for i=0, nplt-1 {
vy[i].plot(g, vx[i])
}
}
objref s, sl
sl = new SectionList()
s = new PlotShape(sl)
fast_flush_list.append(s)
for i=0, ncell-1 {
s.hinton(&cell[i].soma.v(.5), i%10, int(i/10), .25)
}
s.size(-3,11,0,10)
//s.exec_menu("Shape Plot")
|