MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Automating file names in exporting data


Ivan wrote:
> Hi,
> 
> I have a table of data with and I want to write them to different
> files with associated file names
> "x<i>.dat"
> where <i> is the label for the column.
> 
> My question is how do I write the Export command so that I can iterate
> the name of the file with For loop for example.
> 
> thanks in advance
> Ivan
> 

Something along these lines will do it:

MapIndexed[
   Export["x" <> ToString@First[#2] <> ".dat", #1, "Table"] &,
   tableOfData
]


  • Prev by Date: Re: Comparison between Mathematica and other symbolic systems
  • Next by Date: Re: how to get rid of extra parentheses ?
  • Previous by thread: Automating file names in exporting data
  • Next by thread: Re: Automating file names in exporting data