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
how to save data to files automatically in a for loop
-
- Site Admin
- Posts: 6305
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: how to save data to files automatically in a for loop
Use sprint to build the file name string. See this discussion thread:
Indexed file
viewtopic.php?f=8&t=1046
Indexed file
viewtopic.php?f=8&t=1046