There is no problem. This is as it should be.
Referring to the Programmer's Reference, ri(x) returns "the resistance (in megohms) between the center of the segment containing x and its parent segment. . . . If there is no parent the "infinite" resistance returned is 1e30."
http://www.neuron.yale.edu/neuron/stati ... ry.html#ri
For the purpose of determining what is the "parent" it is helpful to think of a model cell as a directed graph in the shape of a tree. The tree's nodes are the nodes of the sections, i.e. the 0 and 1 ends of the sections and the internal nodes of the sections (the nodes that lie at segment centers).
The root section of the tree is the section to which all other sections are connected. The root node of the tree is the node at the 0 end of the root section. This node has no parent node, i.e. there is no node that is conceptually "upstream" from the root node. Every other node in the tree has a parent.
Consider the model cell specified by
Code: Select all
create soma, dend
connect dend(0), soma(0)
The root section is soma, so the root node is soma(0).
The statement
returns 1e+30 because this node has no parent.
Connecting the 0 end of dend to the root node of the tree means that dend(0) also has no parent (there is no node that is conceptually upstream from dend(0)). This is why
also returns 1e+30.