Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

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.


  • Prev by Date: RE: Unevaluated a[[1]]*a[[2]]
  • Next by Date: Re: getting one random number
  • Previous by thread: Re: getting one random number
  • Next by thread: Re: getting one random number