MathGroup Archive 2005

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

Search the Archive

Re: Saving file problem


nilaakash wrote:
> Dear Friends,
>              Here I want to save my file in the following way
> 
> \!\(For[i = 1, i <= 5, 
>     t = Table[{i, x, Sin[x\^i]}, {x, \(-2\) \[Pi], 2  \[Pi], 
>           0.5}]; \[IndentingNewLine]Export["\<tmp.txt\>", 
>       t, "\<Table\>"]; \(i++\)]\)
> 
> But it prints only the last value of i. Please could you tell me how
> to save all the i values in a file.
> 
> Thanks.
> 
> Nilaakash

Nilaakash,

  You can simply nest Table commands:

data = Table[Table[{i, x, Sin[x^2]}, {x, -2 Pi,2 Pi, 0.5}], {i, 1, 5}];
Export["data.txt", "Table"];


--
Igor Antonio
Wolfram Research, Inc.
http://www.wolfram.com

To email me personally, remove the dash.


  • Prev by Date: Re: personalizing Mathematica output
  • Next by Date: Re: Simplify and Abs
  • Previous by thread: Saving file problem
  • Next by thread: pattern matching all list elements but last