Here is a skeleton of one possible implementation of the final procedure.
Ordinary comments are indicated by //,
things that remain to be done are indicated
by remarks inside /* */ pairs.

In broad outline, the procedure profile() walks the synapse along the length of dend. At each node (the 0 and 1 ends plus the center of each segment), the time course of somatic Vm is computed and stored in the vector vm, which is then examined to find its maximum value. The synaptic location and the peak amplitude of the somatically observed epsp are then stored in the vectors location and amplitude, respectively. Finally, the graph g displays a plot of amplitude vs. location.

// objects must first be declared _outside_ procedures
objref location, amplitude
location = new Vector()		// stores locations along the dendrite
amplitude = new Vector()	// stores peak amplitude at each location

objref vm
vm = new Vector()	// to hold the time course of somatic Vm 
			//   evoked by a synaptic input
/* use Vector class .record() to "attach" vm to soma.v(0.5) */

objref g
g = new Graph()		// for plot of amplitude vs. location

proc profile() {
	// next three statements discard prior results, if any
	location = new Vector()
	amplitude = new Vector()
	g = new Graph()
	dend for (x) {	// loop over each node in dend
		putsyn(x)
		// at this point, vm should contain a record of soma.v(0.5) 
		/* find maximum element in vm */
		/* append this to amplitude vector */
		/* append x to location vector */
	}
	/* plot amplitude vs. location */
}


NEURON hands-on course
Copyright © 1998-2009 by N.T. Carnevale and M.L. Hines, all rights reserved.