Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Discussion Groups

Discussion Groups | Matlab DSP | fix random rumbers

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

fix random rumbers - Romain Govav - Mar 1 9:54:00 2005




Dear all,

I am writing a program within which I am genereting
random normal numbers. I would like to get the same
random numbers from run to run. This helps me to check
my program.

Can anybody help me?

thanks in advance
Romain




(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: fix random rumbers - feluda_n_byomkesh_fan - Mar 1 21:12:00 2005



Use help on randn. The relevant sentence for you is.

RANDN('state',0) resets the generator to its initial state.

Hope this helps,
Nandan

--- In , Romain Govav <rivagovav@y...> wrote:
>
> Dear all,
>
> I am writing a program within which I am genereting
> random normal numbers. I would like to get the same
> random numbers from run to run. This helps me to check
> my program.
>
> Can anybody help me?
>
> thanks in advance
> Romain





(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: Re: fix random rumbers - antonio - Mar 2 0:32:00 2005

Another thing you might try:
 
I think you can feed the seed you like to rand. So you can choose the same (known) generator for as long as you want. I did this in C but also Matlab should let you. Check the help on how to do it.
 
Antonio
----- Original Message -----
From: feluda_n_byomkesh_fan
To: m...@yahoogroups.com
Sent: Tuesday, March 01, 2005 6:12 PM
Subject: [matlab] Re: fix random rumbers



Use help on randn.  The relevant sentence for you is.

RANDN('state',0) resets the generator to its initial state.

Hope this helps,
Nandan

--- In m...@yahoogroups.com, Romain Govav <rivagovav@y...> wrote:
>
> Dear all,
>
> I am writing a program within which I am genereting
> random normal numbers. I would like to get the same
> random numbers from run to run. This helps me to check
> my program.
>
> Can anybody help me?
>
> thanks in advance
> Romain


NEW!  You can now post a message or access and search the archives of this group on DSPRelated.com:
http://www.dsprelated.com/groups/matlab/1.php

_____________________________________
/groups/matlab/1.php

To Post:  Send an email to m...@yahoogroups.com

Other DSP Related Groups: http://www.dsprelated.com/groups.php




(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )