recover a value in module at the end
- To: mathgroup at smc.vnet.net
- Subject: [mg51151] recover a value in module at the end
- From: sean kim <sean_incali at yahoo.com>
- Date: Wed, 6 Oct 2004 04:34:37 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello Group,
let's say you have a module that repeats many times.
and let's say you want to keep parameter(s) to memory
or output so that you can recover them at the end.
for instance,
Module[{},
Table[param1 = Random[];param2=Random[],{i, 1000}]
];
if I go
In[51]:= param1
param2
Out[51]= 0.43482
Out[52]= 0.0305665
it only recovers the last number the module used.
I can do,
In[59]:= Module[{},
Table[{param1=Random[];param2=Random[]};
param1>>>param1.txt
,{i,1000}]];
l1 = Import["param1.txt","List"];
Length[l1]
Out[61]= 4000
but the above will not overwrite the values from
previous iteration as shown by the length. ( i
repeated it 4 times)
what do I do if I want to over write the values from
previous iteration and form a new output file
everytime a Module is run?
thanks in advance for any insights.
sean
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
- Follow-Ups:
- Re: recover a value in module at the end
- From: DrBob <drbob@bigfoot.com>
- Re: recover a value in module at the end