Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*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
  • Subject: [mg48555] Re: Random Matrix of Integers
  • From: "Curt Fischer" <crf3 at>
  • Date: Sat, 5 Jun 2004 07:18:55 -0400 (EDT)
  • References: <c9pfmg$suf$>
  • Sender: owner-wri-mathgroup at

Bruce W. Colletti 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.



DiscreteUniformDistribution gets you an array whose elements are uniformly
distributed on {1...8}.  If we add one to each element of this matrix we get
the domain you want.

Curt Fischer

  • Prev by Date: Re: Random Matrix of Integers
  • Next by Date: Re: Advection-Diffusion Equation with variable coefficients
  • Previous by thread: RE: Random Matrix of Integers
  • Next by thread: Re: Random Matrix of Integers