Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!p25g2000hsf.googlegroups.com!not-for-mail
From: Randy Poe <poespam-trap@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: random number generation
Date: Tue, 18 Mar 2008 12:34:08 -0700 (PDT)
Organization: http://groups.google.com
Lines: 23
Message-ID: <e5be6b23-70ec-4227-81e3-49ab9cc75ead@p25g2000hsf.googlegroups.com>
References: <frp525$8i$1@fred.mathworks.com>
NNTP-Posting-Host: 192.35.37.20
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1205868848 29289 127.0.0.1 (18 Mar 2008 19:34:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 18 Mar 2008 19:34:08 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p25g2000hsf.googlegroups.com; posting-host=192.35.37.20; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) 
X-HTTP-Via: 1.1 squid.atl.lmco.com:3128 (squid/2.5.STABLE14)
Xref: news.mathworks.com comp.soft-sys.matlab:457917


On Mar 18, 3:27 pm, "AMMAL " <alan...@ualberta.ca> wrote:
> Hellow everybody,
>
> I need a hand on how to generate a 100 positive numbers
> that follow a normal distribution curve (Bell Shape).In
> otherwords, if i histogram the data, a bell shape will be
> generated. i am not transforming my data, instead, i want
> to generate a posirtive one hundred values that will follow
> a bell shape.
>
> Thanks,
> Ammal

The function RANDN will generate samples from a
standard normal distribution. Note that if you histogram
the results, you won't get a perfect bell shape since samples,
being random, have a little variation in them. The mean
of your samples won't be exactly 0, but something close.
The variance won't be exactly 1, but something close.

That's the nature of random variables and samples.

                 - Randy