Path: news.mathworks.com!newsfeed-00.mathworks.com!solaris.cc.vt.edu!news.vt.edu!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Pseudo random generator
Date: Tue, 1 May 2007 17:52:23 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 24
Message-ID: <f17uon$j9e$1@canopus.cc.umanitoba.ca>
References: <ef557ed.-1@webcrossing.raydaftYaTP> <f17f77$ri5$1@canopus.cc.umanitoba.ca> <ef557ed.1@webcrossing.raydaftYaTP>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1178041943 19758 192.70.172.160 (1 May 2007 17:52:23 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Tue, 1 May 2007 17:52:23 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:406256



In article <ef557ed.1@webcrossing.raydaftYaTP>,
Alissa gotenberg <fete7a_85@hotmail.com> wrote:
>THNX FOR YOUR REPLY , I KNEW BEFORE BOUT THE rand() & randn() , but
>the project specification said it must be pseudo random generated
>code ,
>so i wanted to know if there is a difference between the noramlly
>distributed random or uniform distributed randoms & the pseudo random
>.

Both rand() and randn() return pseudo-random sequences.

>
>cause i guess it is a different random generation algorithm ,

Both of them use the same internal random number generators, but
randn() post-processes (sometimes requiring multiple values) to
generate normally distributed numbers.

In a recent thread (a week ago) 'random variable', Peter Perkins of The
MathWorks posted a reference to the algorithms used in both cases:

http://www.mathworks.com/moler/random.pdf
-- 
  Prototypes are supertypes of their clones.           -- maplesoft