MathGroup Archive 2005

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

Search the Archive

Re: random array of n 2-tuples

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53822] Re: [mg53771] random array of n 2-tuples
  • From: DrBob <drbob at bigfoot.com>
  • Date: Fri, 28 Jan 2005 02:44:24 -0500 (EST)
  • References: <200501271041.FAA07271@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

It depends on what distribution you want, but here are two examples:

Array[Random[Integer, {1, 10}] & , {10, 2}]

{{9, 7}, {7, 10}, {3, 8},
   {6, 4}, {2, 2}, {2, 5},
   {8, 5}, {5, 9}, {1, 5}, {7, 8}}

Needs["Statistics`"]
RandomArray[BinomialDistribution[12, 0.3], {10, 2}]

{{6, 2}, {5, 3}, {6, 3}, {1, 4},
   {3, 1}, {3, 4}, {3, 0},
   {1, 3}, {4, 3}, {5, 6}}

Bobby

On Thu, 27 Jan 2005 05:41:04 -0500 (EST), elparedblanco <cire1611 at gmail.com> wrote:

> Sorry for the neophyte question.  I need an array of n 2-tuples in the
> form:  {{2,3},{5,1},{3,9}, etc.}.  Can someone show me how to do this.
> Thanks
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Re: Re: Latex + Mathematica EPS file problems
  • Next by Date: Re: programming in mathematica
  • Previous by thread: random array of n 2-tuples
  • Next by thread: Re: random array of n 2-tuples