Path: news.mathworks.com!not-for-mail
From: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
Newsgroups: comp.soft-sys.matlab
Subject: Re: random number generation
Date: Tue, 18 Mar 2008 19:42:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 22
Message-ID: <frp5u9$dfo$1@fred.mathworks.com>
References: <frp525$8i$1@fred.mathworks.com>
Reply-To: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1205869321 13816 172.30.248.37 (18 Mar 2008 19:42:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 18 Mar 2008 19:42:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:457918


"AMMAL " <alanazi@ualberta.ca> wrote in message <frp525$8i
$1@fred.mathworks.com>...
> 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
------
  You can use "s*randn(1,100)+m" to generate a hundred normal distribution 
numbers with mean m and standard deviation s, but you cannot be sure all of 
them will be positive.  You cannot have a normal distribution and at the same 
time have only positive numbers.  That is a contradiction in terms.  The "bell 
shape" extends all the way to minus and plus infinity.

Roger Stafford