Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does the Random generator work?

generator
0
Posted

How does the Random generator work?

0

The algorithm for the rand function can be found in S. K. Park and K. W. Miller, “Random Number Generators: Good ones are hard to find,” Comm. ACM, vol. 32, n. 10, Oct. 1988, pg 1192-1201. The formula used for the seed is: seed=(7^5*seed)mod(2^31-1) If you want to set the initial seed to an random value, type the following at the MATLAB prompt: rand(‘SEED’,fix(100*sum(clock))) This will use the clock to set the seed.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123