source: project/release/4/nemo/trunk/examples/CGC/iclamp/original/CGC_Kir_iclamp.hoc @ 27547

Last change on this file since 27547 was 27547, checked in by Ivan Raikov, 7 years ago

nemo: CGC example reorganization

File size: 1.0 KB
Line 
1load_file("nrngui.hoc")
2load_file( "CGC_Kir.hoc" )
3objref stim
4objref g[ 1 ] // graph objects
5objref vgraphbox, hgraphbox[ 1 ]
6vgraphbox=new VBox()
7vgraphbox.intercept(1)
8hgraphbox[ 0 ]=new HBox()
9hgraphbox[ 0 ].intercept(1)
10i =  0
11g[i]=new Graph()
12g[i].exec_menu("Keep Lines")
13hgraphbox[ 0 ].intercept(0)
14hgraphbox[ 0 ].map()
15
16vgraphbox.intercept(0)
17
18vec_sizes = tstop/dt + 1        // recorded traces are all this size
19
20stim=new IClamp(0.5)
21
22dt = 0.001
23
24proc icrun() {
25       
26        stim.del = 1
27        stim.dur = 0.1
28        stim.amp = 10
29
30        init()
31
32        run()
33        $o2.line(g[$1], dt)
34
35        for i=0,$o2.size()-1 {
36            $o4.printf("%g %g\n", $o3.x[i], $o2.x[i])
37        }
38
39        if (stoppedrun()) {
40                break
41        }
42}
43print "generating  Kir "
44objref  Kir
45Kir = new Vector(vec_sizes)
46Kir.record (&soma.ik_CGC_Kir( 0.5 ))
47objref tlog
48tlog = new Vector(vec_sizes,0)
49tlog.record (&t)
50objref logfile
51logfile = new File()
52logfile.wopen ( "Kir.dat" )
53icrun( 0 ,  Kir , tlog, logfile)
54g[ 0 ].label(.5,.85," Kir ")
55logfile.close()
56i=0
57g[i].exec_menu("View = plot")
58vgraphbox.map()
Note: See TracBrowser for help on using the repository browser.