Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Saving file problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54658] Re: [mg54621] Saving file problem
  • From: Igor Antonio <igora at wolf-ram.com>
  • Date: Fri, 25 Feb 2005 01:19:12 -0500 (EST)
  • Organization: Wolfram Research, Inc.
  • References: <200502240821.DAA13273@smc.vnet.net>
  • Reply-to: igora at wolf-ram.com
  • Sender: owner-wri-mathgroup at wolfram.com

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