Re: Writing/appending tables to CSV files?
- To: mathgroup at smc.vnet.net
- Subject: [mg48869] Re: Writing/appending tables to CSV files?
- From: "Curt Fischer" <crf3 at po.cwru.edu>
- Date: Sun, 20 Jun 2004 02:39:21 -0400 (EDT)
- References: <cb0ur5$r5u$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jonathan Greenberg wrote:
> Whats the best way to initialize and write to a csv file in
> Mathematica, given a loop that produces a 1 x N vector each time
> (which I want saved) -- I want the final CSV file to be M x N, where
> M is the number of iterations of the loop and N is the length of the
> output vector. Thoughts?
I think:
In[1]:=
n=10;
m=12;
In[3]:=
loopvec:=Table[Random[],{i,1,n}]
In[4]:=
data=Table[loopvec,{j,1,m}];
In[5]:=
file=Export["data.csv", data,"CSV"]
Out[5]=
data.csv
--
Curt Fischer