Search found 2 matches

by zyousuf
Tue Jan 28, 2020 1:28 am
Forum: NEURON hacks
Topic: How to connect multiple compartments of an axon using a for loop?
Replies: 3
Views: 10182

Re: How to connect multiple compartments of an axon using a for loop?

EDIT: For some reason, it isn't showing here that there is an i in square brackets next to the axon_1(0). It's present in my code though. I'm really confused why this isn't working.

for (i=0; i<numParts; i=i+1){
connect axon_1[i-1](1), axon_1(0) // connects end of axon[0] to start of axon[1]
}
by zyousuf
Tue Jan 28, 2020 1:19 am
Forum: NEURON hacks
Topic: How to connect multiple compartments of an axon using a for loop?
Replies: 3
Views: 10182

How to connect multiple compartments of an axon using a for loop?

So I have an axon which has a 1000 compartments. I have written a for loop that connects the [1] part of one compartment to the [0] of the other and so on until all 1000 compartments are connected. However, I then get the following error: "axon_1[0] connection will form loop in axon_diam_part2....