From: Priom Rahman on
Hi guys, just wondering if someone could help me work out the code to generate a random number between 0 and 1 ? with any number having an equal likelyhood of being generated ?
From: Ross W on
"Priom Rahman" <z3188254(a)unsw.edu.au> wrote in message <i300cg$960$1(a)fred.mathworks.com>...
> Hi guys, just wondering if someone could help me work out the code to generate a random number between 0 and 1 ? with any number having an equal likelyhood of being generated ?

Hi

There's no need to write code. Matlab has a built-in function.

help rand

If you used the search function in Matlab's help, you could find this too.

Ross
From: Priom Rahman on
Thanks I searched for random numbers and i didnt get this link :)
But i'm on board now!!
From: Matt Fig on
Just for future reference, you should be familiar with MATLAB's help. For instance, try this from the command line:

>> docsearch('random numbers')

On my installation, both RAND and RANDN are in the top 5 returned results.