MathGroup Archive 2006

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

Search the Archive

Re: getting one random number

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65173] Re: getting one random number
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 16 Mar 2006 06:22:45 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <dvas8g$c37$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

l[dist_] := Module[{rnd},
              rnd=Random[];
              Map[# < rnd &, k[dist]]
             ]

Regards
  Jens


"Kevin Coffey" <kmc2104 at columbia.edu> schrieb im 
Newsbeitrag news:dvas8g$c37$1 at smc.vnet.net...
| Greetings:
|
| I am a fairly new user and I have come across 
this problem twice. The last
| time I just worked my way around it, but this 
time I can't.
|
| When I exicute the line below, mathematica takes 
a new random number for
| each element in the list "k[dist]"
| l[dist_] := Map[# < Random[] &, k[dist]]
|
| I would like mathematica to take one random 
number and then use the same
| random number for evaluating every element in 
the list.  Also, I want the
| random number to be different each time I use 
the function.
|
| Any help would be most appreciated.
|
| Thank you.
|
| Kevin
|
| 



  • Prev by Date: Re: How to get rid of If[ ... ] in a result
  • Next by Date: Re: getting one random number
  • Previous by thread: Re: getting one random number
  • Next by thread: Re: getting one random number