Thread Subject: Pseudo random generator

Subject: Pseudo random generator

From: Alissa gotenberg

Date: 1 May, 2007 09:19:21

Message: 1 of 9

hi all ,
i wanted a pseudo random code generator for my project and a friend
told me that i can find some help here ,

so plz if anyone know a source code for a pseudo random generator (in
matlab) , tell me about it .

best wishes ,
Alissa gotenberg .

Subject: Pseudo random generator

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 1 May, 2007 13:27:03

Message: 2 of 9

In article <ef557ed.-1@webcrossing.raydaftYaTP>,
Alissa gotenberg <fete7a_85@hotmail.com> wrote:

>i wanted a pseudo random code generator for my project and a friend
>told me that i can find some help here ,

>so plz if anyone know a source code for a pseudo random generator (in
>matlab) , tell me about it .

The built in functions rand() and randn() are pseudo random number
generators. What is the difference between their functionality
and the functionality you need?
--
  Is there any thing whereof it may be said, See, this is new? It hath
  been already of old time, which was before us. -- Ecclesiastes

Subject: Pseudo random generator

From: Alissa gotenberg

Date: 1 May, 2007 10:45:45

Message: 3 of 9

HI Walter ,

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
.

cause i guess it is a different random generation algorithm ,

thnx again and waiting for more infos,

Alissa gotenberg.

Subject: Pseudo random generator

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 1 May, 2007 17:52:23

Message: 4 of 9

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

Subject: Pseudo random generator

From: Anish Goorah

Date: 1 May, 2007 15:55:41

Message: 5 of 9

All random numbers generated are by definition pseudo random. Whether
you need to use rand or randn depends on the application at hand.

  Walter Roberson wrote:
>
>
> 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
>

Subject: Pseudo random generator

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 1 May, 2007 20:21:06

Message: 6 of 9

In article <ef557ed.3@webcrossing.raydaftYaTP>,
Anish Goorah <anish.goorah@gmail.com> wrote:
>All random numbers generated are by definition pseudo random.

If I have a /dev/random system interface that produces true 32 bit
random unsigned long (e.g., it interfaces to a geiger counter or lava
lamp), and I read two values from there and use them to create a
floating point number with 53 bit mantissa, then arguably
I have "generated" the floating point number, but the floating
point number would not be pseudo random.

The matlab randn() algorithm uses pseudo random pairs (or sometimes
additional values are needed) to generate normally distributed
numbers. If the pseudo-random number generation underneath were
replaced with a true random call (e.g., geiger counter, thermal
noise, whatever was available), then although the actual random
values employed might be uniformly distributed, the normal values
output would have to be said to be "generated" -- but they would
still be random, not pseudo random.

The problem here is that "generated" has not been well-defined.

--
Programming is what happens while you're busy making other plans.

Subject: Pseudo random generator

From: Steve Conahan

Date: 1 May, 2007 16:29:03

Message: 7 of 9

"Alissa gotenberg" <fete7a_85@hotmail.com> wrote in message
news:ef557ed.-1@webcrossing.raydaftYaTP...
> hi all ,
> i wanted a pseudo random code generator for my project and a friend
> told me that i can find some help here ,
>
> so plz if anyone know a source code for a pseudo random generator (in
> matlab) , tell me about it .
>
> best wishes ,
> Alissa gotenberg .

Hi Alissa,

Do you mean a PN Sequence Generator consisting of delays and XORs and the
like? If so, there is a PN Sequence Generator with the Communications
Toolbox (for MATLAB) and with the Communications Blockset (for Simulink):

http://www.mathworks.com/access/helpdesk/help/toolbox/comm/ug/seqgen.pn.html

http://www.mathworks.com/access/helpdesk/help/toolbox/commblks/ref/pnsequencegenerator.html

This is in addition to rand and randn functions in base MATLAB (which are
pseudorandom as well, with different pseudorandom algorithms, as noted by
others).

http://www.mathworks.com/moler/random.pdf

Cheers,
Steve Conahan
Communications Development
The MathWorks, Inc.


Subject: Pseudo random generator

From: Alissa gotenberg

Date: 3 May, 2007 11:19:03

Message: 8 of 9

THNX ALLLL ALOT FOR YOUR HELP ,

you guys really saved my day .

wish u all good luck
Alissa.

Subject: Pseudo random generator

From: gggggg adfffffffff

Date: 5 Jun, 2009 02:06:02

Message: 9 of 9

"Alissa gotenberg" <fete7a_85@hotmail.com> wrote in message <ef557ed.-1@webcrossing.raydaftYaTP>...
> hi all ,
> i wanted a pseudo random code generator for my project and a friend
> told me that i can find some help here ,
>
> so plz if anyone know a source code for a pseudo random generator (in
> matlab) , tell me about it .
>
> best wishes ,
> Alissa gotenberg .

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
random number g... Sprinceana 22 Jun, 2009 07:55:00
rand Sprinceana 22 Jun, 2009 07:55:00
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com