Help for random number generator



Hello frnds,
I am new to matlab.I need your guidelines about Random
number generation as I am unable to figure out the right technique to
use
RAND function in Matlab.As in my problem it is giving me same
sequence of values in each iteration of the for loop.

Although I am using CLOCK function to vary my output with time
it does'nt seem to workproperly.
i have used some these functions
rand('state',sum(0.00000001*clock));
and
rand('state',sum(100*clock));

please guide me as to what is the best way to utilize RAND function
so that same sequence is not repeated every time.

Awaiting your reply

Thanks

Nishant

.



Relevant Pages

  • Re: Random number help
    ... >> I need your guidelines about Random number ... >> RAND function in Matlab.As in my problem it is giving me same ... >> sequence of values in each iteration of the for loop. ... In other words, take it out of your FOR loop, if not out of your code ...
    (comp.soft-sys.matlab)
  • Re: random is not random enough?
    ... > stop the program and re-run it, the same sequence is produced. ... That is that under the hood this random calls srand once and then calls ... rand after that. ... The rand function is a pseudo random generator. ...
    (comp.lang.c)
  • Re: rand - is RAND_MAX how long before the same # will occur again?
    ... > The rand function computes a sequence of pseudo-random integers in ... > include a repeated sequence of the same value. ... a very poor quality rand(). ...
    (comp.lang.c)
  • Random number help
    ... generation as I am unable to figure out the right technique to use ... RAND function in Matlab.As in my problem it is giving me same ... sequence of values in each iteration of the for loop. ... Nishant ...
    (comp.soft-sys.matlab)
  • Help for random number generator
    ... number generation as I am unable to figure out the right technique to ... RAND function in Matlab.As in my problem it is giving me same ... sequence of values in each iteration of the for loop. ... Nishant ...
    (sci.stat.math)