MathGroup Archive 2006

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

Search the Archive

Recursion inspection technique : HoldForm but release variables


Hi,

If I define a recursion and hold its form to inspect it :
Clear[test]
test[j_Integer?Positive] :=
                              test[j] = k[j] HoldForm[ test[j - 1] ]

then This is what happens :

   In[22]:= test[4]

Out[22]:= test[4 - 1] k[4]

But I would like it to be with the variable evaluated :

Out[22]:= test[3] k[4]

Whats the trick ???

thanks
Matt


  • Prev by Date: why doesn't the range on this interval match the plot range?
  • Next by Date: Color Matching Functions to model human vision?
  • Previous by thread: Re: why doesn't the range on this interval match the plot range?
  • Next by thread: Re: Recursion inspection technique : HoldForm but release variables