Re: Open Write?
- To: mathgroup at smc.vnet.net
- Subject: [mg30932] Re: [mg30911] Open Write?
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Thu, 27 Sep 2001 02:16:50 -0400 (EDT)
- References: <200109240549.BAA24210@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I think your loop doesn't actually generates values; it simply "prints" them, i.e., displays them on the screen (see Help browser). The two lines below generate the desired values, and then write them to a file "Values.txt". In[1]:= tbl = Table[x^2, {x, 0, 1, .1}] Out[1]= {0, 0.01, 0.04, 0.09, 0.16, 0.25, 0.36, 0.49, 0.64, 0.81, 1.} In[2]:= Export["Values.txt", tbl, "Table"] Out[2]= "Values.txt" This you can open from Excel or something like that. Tomas Garza Mexico City ----- Original Message ----- From: <Moranresearch at aol.com> To: mathgroup at smc.vnet.net Subject: [mg30932] [mg30911] Open Write? > > Here is a simple loop that generates values. > Do[Print[x^2], {x, 0, 1, .1}] > How can I write these values to a file eg. Values.txt? The Print command is > not necessary. > Thank you. > >
- References:
- Open Write?
- From: Moranresearch@aol.com
- Open Write?