01-02-2012 02:20 PM
Roughly speaking, I have a for loop. Inside the for loop I have several instances of this function.
I would like that the random numbers would be more random as possible without repeating (never or almost never).
I want to ask if it is safier for me to use this function with the initialize constant set as FALSE and nothing else, or with the constant put as TRUE but with the seed = -1.
Checking with a small number of iterations I don't see any difference between the 2 choices, but I am not sure and I would like to ask to whom implemented it.
Thank you
Solved! Go to Solution.
01-02-2012 03:34 PM
The gaussian white noise uses the Box-Muller transform using two random numbers generated by the Wichmann-Hill algorithm.
If the seed is negative (or left unwired) it will use a random seed at first run (two different seeds for the two random numbers, while if you give it a seed, it would use the same seed for both).
If you initialize it each time, it will be a tiny fraction slower because it will generate a random new initialization with each call. You will not see a difference.
Ititialization only makes sense if you give it a positive seed value, in which case it will generate the same random sequence after each initialization. However, if you would give a seed and initialize with every call, you would always get the same output which does not sound very interesting and is definitely not very random. 😄