Re: Normally Distributed Random Matrix

*To*: mathgroup at smc.vnet.net*Subject*: [mg77579] Re: Normally Distributed Random Matrix*From*: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>*Date*: Wed, 13 Jun 2007 07:33:19 -0400 (EDT)*Organization*: The Open University, Milton Keynes, UK*References*: <f4lb7t$g0e$1@smc.vnet.net>

amitsoni.1984 at gmail.com wrote: > Hi, > > I want to create a normally distributed random matrix in Mathematica. > I'm using the following code in Mathematica 5.2: > > ------------- code ----------------------------- > << Statistics`NormalDistribution` > n = 500; > A = RandomArray[NormalDistribution[], {n, n}] > ------------------------------------------------ > > But it is not working even though it worked when I did it earlier on > Linux. When I enter A it just gives: > > ------------------------------------------------ > A > RandomArray[NormalDistribution[], {500, 500}] > ------------------------------------------------ > > Can anyone help me with this? > > Thank you, > Amit It looks like the package has not been loaded correctly or that the definition is hidden for some reason. Having loaded the package, evaluate ?NormalDistribution : you must get a help message; otherwise something is wrong with the installed package. For instance, In[1]:= $Version << "Statistics`NormalDistribution`" ?NormalDistribution n = 500; Timing[A = RandomArray[NormalDistribution[], {n, n}]; ][[1]] Dimensions[A] Out[1]= 5.2 for Microsoft Windows (June 20, 2005) NormalDistribution[mu, sigma] represents the normal (Gaussian) distribution with mean mu and standard deviation sigma. Out[5]= 0.219 Second Out[6]= {500,500} Regards, Jean-Marc