The loop does not tell hoc that this statement
Ra = 100
is supposed to be executed for each section in each cell. Consequently hoc merely sets Ra to 100 in the "default" section again and again. The default section is the section whose name can be discovered by executing
print secname()
at the oc> prompt.
If the follwing assumptions are true
1. each element in the cells List is an objref that points to an instance of a biophysical model cell class
2. each biophysical model class has a public member called "all," where "all" is a SectionList that contains all of the sections of that model cell
then here's what you need to do (in pseudocode):
Code: Select all
for each cell in the cells List {
for each section in this particular cell {
Ra = 100
}
}
One way to express this in hoc is
Code: Select all
for i=0,cells.count()-1 {
forsec cells.o(i).all Ra=100
}