Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: Random Matrix of Integers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48609] Re: [mg48544] Random Matrix of Integers
  • From: DrBob <drbob at bigfoot.com>
  • Date: Mon, 7 Jun 2004 05:33:46 -0400 (EDT)
  • References: <200406040851.EAA23928@smc.vnet.net> <opr82yy2x9iz9bcq@holycow.cox-internet.com> <001101c44aa7$6fc4aa50$6401a8c0@bcolletti>
  • Sender: owner-wri-mathgroup at wolfram.com

It is the simplest solution, I think--if you really want to use RandomArray. For most distributions, it probably isn't worthwhile, but it is for the continuous uniform distribution, because Random[] has problems with randomness. RandomArray does better, I think, according to a post I recall from a few weeks ago.

Normal variates are generated in pairs, too, and Random[dist] throws one of them of them away, if dist is normal.

Bobby

On Fri, 4 Jun 2004 22:47:24 -0400, Bruce W. Colletti <bcolletti at compuserve.com> wrote:

> Bobby
>
> Thanks.  You and Sasha (who replied earlier) are the great minds that think
> alike.  You both produced THE solution I sought.
>
> Bruce
>
> ----- Original Message -----
> From: "DrBob" <drbob at bigfoot.com>
To: mathgroup at smc.vnet.net
> To: "Bruce W. Colletti" <bcolletti at compuserve.com>; <mathgroup at smc.vnet.net>
> Sent: Friday, June 04, 2004 1:31 PM
> Subject: [mg48609] Re: [mg48544] Random Matrix of Integers
>
>
>>
>> 1 + RandomArray[DiscreteUniformDistribution[8], {4, 4}]
>>
>> Bobby
>>
>> On Fri, 4 Jun 2004 04:51:01 -0400 (EDT), Bruce W. Colletti
> <bcolletti at compuserve.com> wrote:
>>
>> > To create a 4x4 matrix of random integers drawn from {2..9}, I use:
>> >
>> >     A = Table[Random[Integer, {2, 9}], {4}, {4}]
>> > How can I do this using RandomArray?  Thanks.
>> >
>> > Bruce
>> >
>> >
>>
>>
>>
>> --
>> DrBob at bigfoot.com
>> www.eclecticdreams.net/index.html
>>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net/index.html


  • Prev by Date: Re: Symbolic use of numerical function FindRoot via ?NumericQ
  • Next by Date: Re: FullSimplify Question
  • Previous by thread: Re: Re: Random Matrix of Integers
  • Next by thread: RE: Random Matrix of Integers