http://www.neuron.yale.edu/ftp/neuron/contrib/obidos_tutorials/
Struktura kodu
//==============================================================================
//
// simulation of recurrent networks of simple IAF neurons (placed on a regular lattice, randomly connected) // Based on example 7 from tutorial by M. Rudolph
// Advanced Course in Computational Neuroscience Obidos, Portugal, 2004 //
//==============================================================================
//--- general simulation settings--- dt = 0.1
tstart = 0 tstop = 100
// ---procedure for adding graphs--- load_file("addGraphs.hoc")
//---creating cells--- load_file("createCells.hoc")
//---creating network--- load_file("createNetwork.hoc")
//---adding network input--- load_file("addNetworkInput.hoc")
Struktura kodu
// --- initialization--- proc init() {
finitialize() fcurrent() }
//---access origin of network--- access neuron[0].soma
//---adding graphs--- addgraph("neuron[0].IAF.M", -2, 3)
addgraph("neuron[1].IAF.M”, -2, 3)
Struktura kodu
//modify step() procedure from stdrun.hoc
proc step() { local i //integrates one step needed for plotting, it may integrate over many dt time steps for i=1, nstep_steprun { advance() }
Plot() //iterates over all the Graphs in the various plot lists //that need to be updated during a simulation run // to allow ShapePlots for network activity
for i=0, NumberCells-1 {
neuron[i].soma.v(0.5) = neuron[i].IAF.M }
}
//---recording data for rasterplot--- load_file("record.hoc")
//---running simulation--- proc go() {
init()
run() //procedure from stdrun.hoc plotraster()
}