Page 1 of 1

integer to string in NEURON

Posted: Wed Jul 26, 2006 6:57 pm
by tort
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

Posted: Wed Jul 26, 2006 10:02 pm
by ted
See this thread on the topic
opening data files with variable names
under
Other questions
https://www.neuron.yale.edu/phpBB2/view ... ght=sprint

Posted: Thu Jul 27, 2006 3:56 pm
by tort
OK, problem solved, thank you very much for your help!