how to save data to files automatically in a for loop
Posted: Wed Jul 21, 2010 7:13 am
for example, I have a parameter to scan, in a for loop.
for i=1; i<10; i=i+1
{
open a new file
write to this file
close it
}
how to name the new files automatically, such as data_1.dat data_2.dat data_3.dat
for i=1; i<10; i=i+1
{
open a new file
write to this file
close it
}
how to name the new files automatically, such as data_1.dat data_2.dat data_3.dat