MathGroup Archive 2006

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

Search the Archive

Re: making random matrix


amitsoni.1984 at gmail.com wrote:
> Hi, I want to make a normally distributed random matrix for which I am
> using the following command. But it is not giving any result.
> 
> n=100
> A = RandomArray[NormalDistribution[], {n, n}]
> 
> Do I need to load any package to get this working. Please tell me how
> to do that?
> 
> Thanks
> 
> Amit
> 

Yes, first, you must load the package:

  Needs["Statistics`NormalDistribution`"]
  Module[ {ndist},
  ndist = NormalDistribution[ 0, 1];
  With[ { n=100},
  mat= RandomArray[ ndist, { n,n}]
]]

Regards,
Jean-Marc


  • Prev by Date: Re: "short circuiting" And and Or
  • Next by Date: Re: Problem in loading packages in Mathematica
  • Previous by thread: Re: making random matrix
  • Next by thread: Re: making random matrix