MathGroup Archive 1997

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

Search the Archive

Creating table with multiple lists

  • To: mathgroup at
  • Subject: [mg7510] Creating table with multiple lists
  • From: "Ed McCarthy" <ed_mccarthy at>
  • Date: Sat, 7 Jun 1997 03:49:01 -0400 (EDT)
  • Organization: EDM
  • Sender: owner-wri-mathgroup at

I'm trying to create a table with multiple lists that have the same
starting value. Here's the basic code:

t=100; x=0;
path=Table[x=x+Random[z], {t}]

This code will generate a continuous path starting at x=0, which is what I
want. My goal is to repeat the process multiple times, but starting each
new iteration with x=0 while storing each path. This For loop works, but
I'm looking for a better way to do it.

For[i=0, i<10, i++,
t=100; x=0;

Does any have suggestions for generating multiple paths (with x reset to 0
for each iteration) with a functional approach? I'd like to avoid AppendTo
if possible.Thanks--any comments appreciated.

Ed McCarthy

  • Prev by Date: Any uses for SequenceHold ?
  • Next by Date: Need a new type of Hold
  • Previous by thread: Re: Any uses for SequenceHold ?
  • Next by thread: Re: Creating table with multiple lists