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: Output to a file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57053] Re: Output to a file
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Thu, 12 May 2005 22:44:50 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 5/12/05 at 2:34 AM, namrata.khemka at gmail.com (Namrata Khemka)
wrote:

>Hello, I want to write the following list in a file, (and below is
>what I did)

>testList = {{1, 8}, {2, 9}, {3, 10}, {4, 11}, {5, 12}, {6, 13}, {7,
>14}};

>str = OpenWrite["test.dat"];

>Write [str, testList]; Close[str];

>test.dat looks like {{1, 8}, {2, 9}, {3, 10}, {4, 11}, {5, 12}, {6,
>13}, {7, 14}}

>But, I want the test.dat to look like:

>1  8
>2   9
>3   10
>4  11

>and so on...

>Can anyone give me any suggestions as to how I can accomplish this?

Probably the simplest way to achieve what you want is to use Export, i.e.,

Export["test.dat, testList, "Table"]
--
To reply via email subtract one hundred and four


  • Prev by Date: Integrate gives wrong answer
  • Next by Date: Re: Re: bode diagram
  • Previous by thread: Re: Output to a file
  • Next by thread: Re: Output to a file