object name substitution
Posted: Wed Oct 29, 2008 11:05 am
I was wondering how to do the following:
I have created e.g. 3 synapses called syn1, syn2 and syn3. All are dual exponential synapses.
In a loop I would like to change e.g. tau1 of these 3 synapses to different values, like:
for cnt = 1, 3 {
...
syncnt.tau1 = cnt * 5
...
}
Thus, in this loop I'd like to have the counter refer to the different object names and change their respective tau1. Or how can I construct the name of an object with a counter and change some parameters of this object? Or said differently; how can I concatenate a prefix and a cnt value so that it make a object name. Of course, one could say create the synapse with: objectvar syn[3] instead but lets assume this is not an option.
thanks,
Koen Vervaeke
I have created e.g. 3 synapses called syn1, syn2 and syn3. All are dual exponential synapses.
In a loop I would like to change e.g. tau1 of these 3 synapses to different values, like:
for cnt = 1, 3 {
...
syncnt.tau1 = cnt * 5
...
}
Thus, in this loop I'd like to have the counter refer to the different object names and change their respective tau1. Or how can I construct the name of an object with a counter and change some parameters of this object? Or said differently; how can I concatenate a prefix and a cnt value so that it make a object name. Of course, one could say create the synapse with: objectvar syn[3] instead but lets assume this is not an option.
thanks,
Koen Vervaeke