MathGroup Archive 2009

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

Search the Archive

Re: Random choice



Hi Valeri,

the magic word is: RandomSample.

Daniel





Valeri Astanoff wrote:

> Good day,

> 

> Given this example :

> 

> In[1]:= RandomChoice[Range[500], 100] // Union // Length

> 

> Out[1]= 91

> 

> what is the best way to get *exactly* 100 different

> random numbers ranging from 1 to 500 ?

> 

> Any piece of advice would be appreciated.

> 

> --

> 

> Valeri Astanoff

> 




  • Prev by Date: Re: FinancialData and disjoint result sets from range and
  • Next by Date: Re: Random choice
  • Previous by thread: Re: Re: Random choice
  • Next by thread: Re: Random choice