Re: This Should Be Easy.
- To: mathgroup@smc.vnet.net
- Subject: [mg11923] Re: This Should Be Easy.
- From: WMacD@erols.com (William M. MacDonald)
- Date: Thu, 9 Apr 1998 00:33:25 -0400
- Organization: Erol's Internet Services
- References: <6fsjlo$gm0@smc.vnet.net>
In article <6fsjlo$gm0@smc.vnet.net>, "Chris Farr" <farr@brown.edu>
wrote:
> Math Group:
>
> I'm just trying to ouput a matrix in Mathematica to a file without all
> of the { {}, {} } etc. That is I want an ascii file that looks like
> the following:
>
> 47 98
> 34 45
> . .
> . .
> . .
>
> as opposed to
>
> {{47,98},{34,45},...}
>
> My ultimate goal is to put the matrix data into Excel. Is there an
> elegant way to do this? I've perused the help in Mathematica but could
> not find anything.
>
> Thanks in advance,
>
> Chris Farr
Chris,
Say that DataSet is in the form of a xy pairs {{x1,y1},{x2,y2},..}.
Just use
OutputForm[TableForm[DataSet]]>>datafile
where "datafile" is the file that you want to use. See pp. 418, 599,
609 of "The Mathematica Book" by Wolfram.