Path: news.mathworks.com!not-for-mail
From: "Michael Grosswald" <michaelgrosswald@yahoo.co.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Random matrix/normal distribution
Date: Tue, 29 Sep 2009 20:07:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 9
Message-ID: <h9tpd6$bh9$1@fred.mathworks.com>
Reply-To: "Michael Grosswald" <michaelgrosswald@yahoo.co.uk>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1254254822 11817 172.30.248.35 (29 Sep 2009 20:07:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 29 Sep 2009 20:07:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1728678
Xref: news.mathworks.com comp.soft-sys.matlab:573790


I'm trying to generate random matrices whose entries are from the normal distribution.

Something like this:

(1/(sqrt(2*pi)))*exp(-(1+99*rand(5))^2/2)

Isn't going to work because squaring a matrix doesn't square each entry. How can I correct this or am I going about this the wrong way.

I'm still a MATLAB beginner so go easy on me!