Re: getting one random number
- To: mathgroup at smc.vnet.net
- Subject: [mg65177] Re: getting one random number
- From: "Borut Levart" <BoLe79 at gmail.com>
- Date: Thu, 16 Mar 2006 06:33:37 -0500 (EST)
- References: <dvas8g$c37$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
You were close. Now discover With! For with With you can first draw a random number and then use it in calculation in more places. Look, I modified your definition just a bit: l[dist_] := With[{x = Random[]}, Map[# < x &, k[dist]]] Bye.