Page 1 of 1

altering length and diameter over a subset

Posted: Fri Dec 20, 2019 9:41 am
by fabien tell
Hello,

Just a short question: is it possible to change section length or diameter for all the sections in a subset as a whole?

I would expect to write :
if I have a subset called all_dendrite

Code: Select all

for i=1, 8  {
forsec  all_dendrite {L=L/i}

 forsec all { nseg = int((L/(0.1*lambda_f(100))+.999)/2)*2 + 1  } // to take into account the reduction in length
....

analysis()
}
I should try it but if it doesn't work I could use a loop to go through every section in a subset.

Thanks

Re: altering length and diameter over a subset

Posted: Sun Dec 22, 2019 9:36 pm
by ted
for i=1, 8 {
forsec all_dendrite {L=L/i} <--- you changed the length of every section in "all_dendrite"

forsec all { nseg = int((L/(0.1*lambda_f(100))+.999)/2)*2 + 1 } <--- now you're changing nseg in every section in "all"
...

analysis()
}