Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2011

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

Search the Archive

delay evaluation inside RecurrencTable?

  • To: mathgroup at
  • Subject: [mg122443] delay evaluation inside RecurrencTable?
  • From: Alan <alan.isaac at>
  • Date: Sat, 29 Oct 2011 07:07:35 -0400 (EDT)
  • Delivered-to:
  • Reply-to: comp.soft-sys.math.mathematica at

My first attempt to simulate an AR(1) process was
RecurrenceTable[{a[n] == 0.8*a[n - 1] + RandomReal[{-1, 1}], 
  a[0] == 100}, a, {n, 1, 20}]
which of course failed because RandomReal was only evaluated once.

Is there some way to get a new evaluation of RandomReal for each n (*inside* RecurrenceTable)?

Alan Isaac

PS Sorry if this repeats. I posted this question days ago and it has not yet appeared.

  • Prev by Date: Re: Parameter replacement with known parameters
  • Next by Date: Color Slidder Bar Button & Panel Face
  • Previous by thread: Re: InputAliases
  • Next by thread: Re: delay evaluation inside RecurrencTable?