--- Pramodh Narayanan <> wrote: > Hi!
>
> I just need to generate random numbers that follow
> some distribution like poisson,
> exponential,normal,etc. For these distributions
> there
> are functions available directly like poissrnd for
> poisson distribution, normrnd for normal
> distribution,etc. But every time u run them they
> give
> different sets of random numbers. How do I know what
> is the seed used to generate these numbers so that I
> can reuse the seed to generate them , if I want to.
>
> Thankx,
> Pramodh.
>
Reply by navaneetha krishnan●September 6, 20022002-09-06
The functions poissrnd, normrnd... internally use rand
or randn. You can check which one is used by looking
into the function in an editor.
You can set the seeds of rand or randn thereby making
these wrapper functions repeatable.
Navan
--- Pramodh Narayanan <> wrote: > Hi!
>
> I just need to generate random numbers that follow
> some distribution like poisson,
> exponential,normal,etc. For these distributions
> there
> are functions available directly like poissrnd for
> poisson distribution, normrnd for normal
> distribution,etc. But every time u run them they
> give
> different sets of random numbers. How do I know what
> is the seed used to generate these numbers so that I
> can reuse the seed to generate them , if I want to.
>
> Thankx,
> Pramodh.
Reply by Pramodh Narayanan●September 6, 20022002-09-06
Hi!
I just need to generate random numbers that follow
some distribution like poisson,
exponential,normal,etc. For these distributions there
are functions available directly like poissrnd for
poisson distribution, normrnd for normal
distribution,etc. But every time u run them they give
different sets of random numbers. How do I know what
is the seed used to generate these numbers so that I
can reuse the seed to generate them , if I want to.