MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Other Way than Print[] for Intermediate Results


I'm looking for a neat way to safe intermediate results for simulating
loads of recursive functions. This is the way I solved it, but
unfortunatly the command print, prints all the results which I'm not
interested in.

s[t_] :=For[k = 0,
      k â?¤ t,k++,Buffer[k]; Rating[k];
Print[VirtualBuffer[k]];Print[VirtualRating[k]]

with

Buffer[k_ /; k == 0] := VirtualBuffer[k] = Table[Mod[α
AverageRating[0] + θ,λ], {i, 1, n}]

The other tables look almost the same, but I don't want any confusion.

All I'm looking for is the last result of s[t_] not the intermediates.
VirtualBuffer and VirtualRating are vectors which contain intermediate
results. For[] does not seem to calculate the values and safe them
without printing the values.
Please help, thanks.


  • Prev by Date: Re: Timed Notebooks for Student Take-home examinations
  • Next by Date: Re: Re: Hardware question
  • Previous by thread: Nesting NMaximize
  • Next by thread: Re: Other Way than Print[] for Intermediate Results