MathGroup Archive 2005

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

Search the Archive

Re: simple question about random


Hi David,

Why wouldn't a Do/For loop work?  The following seem to work just fine,
even if they are somewhat bulky and inefficient.

rand={};
Do[rand=Prepend[rand,Random[]],{6}];

rand1={};
For[i=1,i=6,i++,rand1=Prepend[rand1,Random[]]];

I personally would use Table or RandomArray, but...


  • Prev by Date: Re: Casting a Command as a String
  • Next by Date: evaluate assuming odd integers?
  • Previous by thread: Re: simple question about random
  • Next by thread: Re: Re: simple question about random