Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*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 1999

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

Search the Archive

Re: saving a list.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18949] Re: saving a list.
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 30 Jul 1999 01:33:42 -0400
  • Organization: Universitaet Leipzig
  • References: <7nlolp$bam@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Dave,

in Mathematica 4.0 you can say

cc = {{1, 2.7}, {2, 1.9}, {3, 3.0}}

In[5]:=
Export["~/tmp/mat.dat", cc, "Table"]

Out[5]=
"~/tmp/mat.dat"

In[6]:=
!! ~/tmp/mat.dat

1   2.7
2   1.9
3   3.

in Mathematica 3.0.x it is a bit more complicated
look at 

http://support.wolfram.com/Kernel/Files/WriteMatrix3.html

Hope that helps
  Jens

Dave Berube wrote:
> 
> I am writing a program that inputs 2 lists of numbers each with two
> columns, and creates a 3rd list also with two columns.
> 
> For Example, lets say that the files file.txt and file2.txt look like this:
> 
> file.txt                  file2.txt
> 
> 1    1.5                  0    3.6
> 2    4.6                  2    1.9
> 3    6.8                  6    4.2
> 
> I can read them into Mathematica with ReadList
>   A = ReadList["file.txt", {Number, Number}]
>   B = ReadList["file2.txt", {Number, Number}]
> 
> then I do all my operations that I need to do on them and come up with a
> two column matrix C.
> 
> In plain old Mathematica form it looks like, say,
> 
> C = {{1, 2.7}, {2, 1.9}, {3, 3.0}}
> 
> But I want to get a file, call it file3.txt, that contains just 2 columns,
> like file.txt and file2.txt.


  • Prev by Date: Re: Re: Slow Version 4 Front End
  • Next by Date: HELP : Mathematica v4 producing erroneous results ! Mathematica3 worked fine...
  • Previous by thread: Re: saving a list.
  • Next by thread: v4.0 bug???