[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Creating a series of random number
I assume you want to sample from
a uniform distribution on some integers.
Let's suppose we want to sample from 0 ... 9.
gen random = floor(10 * uniform())
or from 00 (i.e. 0) ... 99
gen random = floor(100 * uniform())
or from 10 ... 99
gen random = 10 + floor(90 * uniform())
and so forth.
This is wrapped in an -egen- function
-rndint()- in -egenmore- on SSC,
but doing it from first principles
is better exercise.
Ha Thai Son
> Does any one know how to create a series of random number
> with n digit.
* For searches and help try: