|
Like dendritic diameter in our example, most cellular properties are
functions of the position parameter x. NEURON has special provisions
for dealing with these properties, which are called "range variables." Other
examples of range variables include the membrane potential v, and
ionic conductance parameters such as the maximum HH sodium conductance
gnabar_hh (siemens / cm2).
Range variables enable the user to separate property specification from
segment number. A range variable is assigned a value in one of two ways. The
simplest and most common is as a constant. For example, the statement
axon.diam = 10 asserts that the diameter of the axon is uniform over
its entire length.
The syntax for a property that changes along a length of a section is
rangevar(xmin:xmax) = e1:e2. The four
italicized symbols are expressions with e1 and
e2 being the values of the property at xmin and
xmax, respectively. The position expressions must meet the
constraint 0 <= xmin <= xmax <= 1.
Linear interpolation is used to assign the values of the property at the
segment centers that lie in the position range [xmin,
xmax]. In this manner a continuously varying property can be
approximated by a piecewise linear function. If the range variable is
diameter, neither e1 nor e2 should be 0, or
corresponding axial resistance will be infinite.
In our model neuron, the simple dendritic taper is specified by diam(0:1)
= 10:3 and nseg = 5. This results in five segments that have
centers at x = 0.1, 0.3, 0.5, 0.7 and 0.9 and diameters of 9.3, 7.9,
6.5, 5.1 and 3.7, respectively.
The value of a range variable at the center of a segment can appear in any
expression using the syntax rangevar(x) in which 0 <= x
<= 1. The value returned is the value at the center of the segment
containing x, NOT the linear interpolation of the values stored at the
centers of adjacent segments. If the parentheses are omitted, the position
defaults to a value of 0.5 (middle of the section).
A special form of the for statement is available:
for (var) stmt.
For each value of the normalized position parameter x that
defines the center of each segment in the selected section (along with
positions 0 and 1), this statement assigns var that value and executes
the stmt. This hoc code would print the membrane potential
as a function of physical position (in um) along the axon:
axon for (x) print x*L, v(x)
|