Skip to main content
added 376 characters in body
Source Link
Yves Klett
  • 15.5k
  • 5
  • 58
  • 125

If you want recursive (not performance, mind):

dat = Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8];

rec[dat_] := 
 Append[dat[[2 ;; -1]], 
  Round@RandomVariate[NormalDistribution[1000, 0.1*1000]]]

NestList[rec, dat, 10]//Grid

Mathematica graphics

ach well, here cometh the color:

dat = MapIndexed[Style[#, Hue[#2[[1]]/8]] &, 
   Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8]];

NestList[rec, dat, 10] // Grid

Mathematica graphics

As for a two-argument function:

k = 1;
dat = Round@RandomVariate[NormalDistribution[1000, k*1000], 8];

rec[dat_, k_] := 
 Append[dat[[2 ;; -1]], 
  Round@RandomVariate[NormalDistribution[1000, k*1000]]]

NestList[rec[#, k] &, dat, 10] // Grid

Mathematica graphics

If you want recursive:

dat = Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8];

rec[dat_] := 
 Append[dat[[2 ;; -1]], 
  Round@RandomVariate[NormalDistribution[1000, 0.1*1000]]]

NestList[rec, dat, 10]//Grid

Mathematica graphics

ach well, here cometh the color:

dat = MapIndexed[Style[#, Hue[#2[[1]]/8]] &, 
   Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8]];

NestList[rec, dat, 10] // Grid

Mathematica graphics

If you want recursive (not performance, mind):

dat = Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8];

rec[dat_] := 
 Append[dat[[2 ;; -1]], 
  Round@RandomVariate[NormalDistribution[1000, 0.1*1000]]]

NestList[rec, dat, 10]//Grid

Mathematica graphics

ach well, here cometh the color:

dat = MapIndexed[Style[#, Hue[#2[[1]]/8]] &, 
   Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8]];

NestList[rec, dat, 10] // Grid

Mathematica graphics

As for a two-argument function:

k = 1;
dat = Round@RandomVariate[NormalDistribution[1000, k*1000], 8];

rec[dat_, k_] := 
 Append[dat[[2 ;; -1]], 
  Round@RandomVariate[NormalDistribution[1000, k*1000]]]

NestList[rec[#, k] &, dat, 10] // Grid

Mathematica graphics

added 263 characters in body
Source Link
Yves Klett
  • 15.5k
  • 5
  • 58
  • 125

If you want recursive:

dat = Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8];

rec[dat_] := 
 Append[dat[[2 ;; -1]], 
  Round@RandomVariate[NormalDistribution[1000, 0.1*1000]]]

NestList[rec, dat, 10]//Grid

Mathematica graphics

ach well, here cometh the color:

dat = MapIndexed[Style[#, Hue[#2[[1]]/8]] &, 
   Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8]];

NestList[rec, dat, 10] // Grid

Mathematica graphics

If you want recursive:

dat = Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8];

rec[dat_] := 
 Append[dat[[2 ;; -1]], 
  Round@RandomVariate[NormalDistribution[1000, 0.1*1000]]]

NestList[rec, dat, 10]//Grid

Mathematica graphics

If you want recursive:

dat = Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8];

rec[dat_] := 
 Append[dat[[2 ;; -1]], 
  Round@RandomVariate[NormalDistribution[1000, 0.1*1000]]]

NestList[rec, dat, 10]//Grid

Mathematica graphics

ach well, here cometh the color:

dat = MapIndexed[Style[#, Hue[#2[[1]]/8]] &, 
   Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8]];

NestList[rec, dat, 10] // Grid

Mathematica graphics

Source Link
Yves Klett
  • 15.5k
  • 5
  • 58
  • 125

If you want recursive:

dat = Round@RandomVariate[NormalDistribution[1000, 0.1*1000], 8];

rec[dat_] := 
 Append[dat[[2 ;; -1]], 
  Round@RandomVariate[NormalDistribution[1000, 0.1*1000]]]

NestList[rec, dat, 10]//Grid

Mathematica graphics