integer to string in NEURON
Posted: Wed Jul 26, 2006 6:57 pm
Hi,
As I have stochastic parts in my model, I have to run the simulation several times, which I found out could be obtained by say
proc start(){
for(x=0; x<N; x=x+1) {
run()
}
}
Each simulation leads to a .dat file (I changed the run procedure accordingly). So, after N simulation I would like to have N .dat files with the results, however, if I dont change the name of the .dat file I will finish with only one, the last result. Although it is easy to set an integer counter, I didn't find out how to transform it in a string, in order to be used as part of the name of my .dat file.
Ie, I wonder if it is possible to obtain something as (in matlab):
s = ['result' int2str(x)]
save(s,'data','-ascii')
(with, of course, the proper code for NEURON).
Can you help me?
Thank you!
Adriano Tort
As I have stochastic parts in my model, I have to run the simulation several times, which I found out could be obtained by say
proc start(){
for(x=0; x<N; x=x+1) {
run()
}
}
Each simulation leads to a .dat file (I changed the run procedure accordingly). So, after N simulation I would like to have N .dat files with the results, however, if I dont change the name of the .dat file I will finish with only one, the last result. Although it is easy to set an integer counter, I didn't find out how to transform it in a string, in order to be used as part of the name of my .dat file.
Ie, I wonder if it is possible to obtain something as (in matlab):
s = ['result' int2str(x)]
save(s,'data','-ascii')
(with, of course, the proper code for NEURON).
Can you help me?
Thank you!
Adriano Tort