MathGroup Archive 2007

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

Search the Archive

Re: How to export txt files with variable name &


Cham wrote:

> I need to use the operation
> 
> D0[Export["Coord_n.txt", Coord[n], "Table"], {n, 0, 3}]
> 
> with a variable name.  I want Mathematica to write down several files with
> names likes this (as much names as there are values for the variable "n")
> :
> 
> Coord_0.txt,  Coord_1.txt,  Coord_2.txt,  Coord_3.txt
> 
> How can I do that ?

Export[StringJoin["Coord_",ToString[n],".txt"], Coord[n], "Table"]

or using the shortcut notation for StringJoin:

Export["Coord_"<>ToString[n]<>".txt", Coord[n], "Table"]


hth,

albert


  • Prev by Date: Re: ContainsQ ?
  • Next by Date: Re: Call-by-reference from inside a function
  • Previous by thread: Re: How to export txt files with variable name &
  • Next by thread: RE: How to export txt files with variable name &