Re: FileName and Shell Command
- To: mathgroup at smc.vnet.net
- Subject: [mg30962] Re: [mg30939] FileName and Shell Command
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Fri, 28 Sep 2001 03:55:12 -0400 (EDT)
- References: <200109270617.CAA01151@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Try this:
For[j=1,j<4,j++,
{franc={};
For[i=1,i<10,i++,
{franc=Append[franc,j*i]};
];
Export["franc"<>ToString[j]<>".dat",franc,"CSV"] };
]
You get franc1.dat, franc2.dat and franc3.dat which you may open from Excel
or some such other.
Tomas Garza
Mexico City
----- Original Message -----
From: "franc" <francois.gachon at edf.fr>
To: mathgroup at smc.vnet.net
Subject: [mg30962] [mg30939] FileName and Shell Command
> Hello !
>
> I have a problem to copy data in files
>
> my program is :
>
> 1 For[j=1,j<4,j++,
> 2 {franc={};
> 3 For[i=1,i<10,i++,
> 4 {franc=Append[franc,j*i]
> 5 };
> 6 ] };
> 7 ]
>
> So i would like to save franc in a external file : franc1.data,
> franc2.data, franc3.data
>
> Th command i use is :
>
> franc>>franc.data
> Run["cp franc.data franc$j.data"]
> (after line 6)
>
> But mathematica ignore the $i and just save franc.data so i only keep
> the last calculated (for j=3)
>
> SO if you have a key to solve my pb, PLEASE help.
>
> Thank you !!!!!!
>
>
- References:
- FileName and Shell Command
- From: franc <francois.gachon@edf.fr>
- FileName and Shell Command