Loop, deleting intermediary results, lists
- To: mathgroup at smc.vnet.net
- Subject: [mg78753] Loop, deleting intermediary results, lists
- From: kristoph <kristophs.post at web.de>
- Date: Sun, 8 Jul 2007 06:17:16 -0400 (EDT)
Dear all, Assume we have f[x_]:=f[x]=x^2 within some For[x=1,x<=3,x++...] loop. At each iteration we assign a value to f[x] which results in a total of three values. I would like to delete at each iteration x the previous result of f. Thus, we would only have a result of f[3] but not for the f[1] and f[2]. This is a very simplified example but I think it describes my problem well enough. The problem I have is that I generate via a loop a massive amount of data in form of a list which I combine in one big list but I don't need the intermediary results. At the moment Mathematica 5.2 is always crashing and I think it has to do with these lists. I didn't us f[x-1]={} within the loop so far but I thought there might be a more elegant way to handle the problem. Thanks in advance, Kristoph