Re: Normally Distributed Random Matrix
- To: mathgroup at smc.vnet.net
- Subject: [mg77592] Re: Normally Distributed Random Matrix
- From: Bill Rowe <readnewsciv at sbcglobal.net>
- Date: Wed, 13 Jun 2007 07:40:25 -0400 (EDT)
On 6/12/07 at 1:24 AM, amitsoni.1984 at gmail.com wrote: >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: The code above should not have worked as written on any OS running version 5.2 of Mathematica. If you look at the syntax for the NormalDistribution function you will see it needs to be told the mean and standard deviation. That is the correct code would be Statistics`NormalDistribution` n = 500; A = RandomArray[NormalDistribution[0,1], {n, n}] for generating random normal deviates with mean = 0 and standard deviation = 1 -- To reply via email subtract one hundred and four