Created
November 6, 2013 11:15
-
-
Save gngdb/7334467 to your computer and use it in GitHub Desktop.
hoc file used for NEURON assignment at University of Edinburgh.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create soma and dendrite | |
create soma | |
access soma | |
create dend | |
// connect the soma to the dendrite | |
connect dend(0),soma(0) | |
// set up parameters of the soma | |
soma insert pas | |
soma { | |
diam = 10 | |
L = 10 | |
nseg=1 | |
g_pas = 0.0005 | |
} | |
//set up parameters of the dendrite | |
dend insert pas | |
dend { | |
diam = 1 | |
L = 500 | |
nseg = 27 | |
g_pas = 0.0005 | |
} | |
//creating exponential synapse on the dendrite | |
objref esyn1 | |
dend esyn1 = new ExpSyn(0.5) | |
esyn1.tau=5 // time constant in ms | |
esyn1.e=0 // synaptic reversal potential | |
//why is there a variable nil being initialised and handed to NetCon here? | |
objref nil,nc1 | |
nc1 = new NetCon(nil, esyn1) | |
nc1.delay = 0 | |
nc1.weight = 0.002 //weight in uS | |
//setting the time of synaptic input here | |
objref syntimes1 | |
syntimes1 = new Vector(1) | |
syntimes1.x[0] = 10 | |
//no idea what this does | |
objref fih | |
fih = new FInitializeHandler("loadqueue()") | |
proc loadqueue() { local ii | |
for ii=0, syntimes1.size()-1{ | |
nc1.event(syntimes1.x[ii]) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment