load_file("nrngui.hoc") objref vce // voltage clamp) objref g[ 1 ] // graph objects objref vgraphbox, hgraphbox[ 1 ] vgraphbox=new VBox() vgraphbox.intercept(1) hgraphbox[ 0 ]=new HBox() hgraphbox[ 0 ].intercept(1) i = 0 g[i]=new Graph() g[i].exec_menu("Keep Lines") hgraphbox[ 0 ].intercept(0) hgraphbox[ 0 ].map() vgraphbox.intercept(0) vec_sizes = tstop/dt + 1 // recorded traces are all this size soma vce=new VClamp(0) dt = 0.001 proc vcrun() { vce.dur[0]=vchdur vce.dur[1]=vcbdur vce.dur[2]=vchdur tstop=vce.dur[0]+vce.dur[1]+vce.dur[2] vce.amp[0]=vchold vce.amp[2]=vchold for j=0, vcsteps-1 { x=vcbase+j*vcincrement vce.amp[1]=x init() run() $o2.line(g[$1], dt) for i=0,$o2.size()-1 { $o4.printf("%g %g\n", $o3.x[i], $o2.x[i]) } if (stoppedrun()) { break } } } print "generating NaR " vchold = soma.comp313_vchold_Golgi_NaR vcbase = soma.comp313_vcbase_Golgi_NaR vcincrement = soma.comp313_vcinc_Golgi_NaR vcsteps = soma.comp313_vcsteps_Golgi_NaR vchdur = soma.comp313_vchdur_Golgi_NaR vcbdur = soma.comp313_vcbdur_Golgi_NaR objref NaR NaR = new Vector(vec_sizes) NaR.record (&soma.i_NaR_Golgi_NaR( 0.5 )) objref tlog tlog = new Vector(vec_sizes,0) tlog.record (&t) objref logfile logfile = new File() logfile.wopen ( "NaR.dat" ) vcrun( 0 , NaR , tlog, logfile) g[ 0 ].label(.5,.85," NaR ") logfile.close() i=0 g[i].exec_menu("View = plot") vgraphbox.map()