Skip to main content
3 of 3
deleted 7 characters in body
rm -rf
  • 89.3k
  • 21
  • 297
  • 479

A straightforward way would be using recursion and memoization. An example:

n = 5;
c = RandomReal[NormalDistribution[], n]/100;

Clear[x]
Array[(x[#] = RandomReal[NormalDistribution[]]) &, n]; (* Initial conditions *)
x[t_Integer] /; t > n := x[t] = c.Table[x[i], {i, t - 1, t - n, -1}] +
     RandomReal[NormalDistribution[]]

ListLinePlot[x /@ Range[300]]

enter image description here

rm -rf
  • 89.3k
  • 21
  • 297
  • 479