**RANDG**

RANDG returns a randomly-selected value from a Gaussian distribution having a specified mean and distribution, which are provided as parameters. Note that Random function returns a random value from a uniform distribution.

The optional third parameter has the following effects.

a) If the parameter is zero, than the RANDG function operates exactly as it would with two parameters.

b) If the parameter is greater than zero, it is used to generated a seed for the random number generator routines. In this case, the RANDG funciton will always return the same value if a constant value is provided for the seed, e.g., RANDG(Mean, StdDev, 99)

c) if the parameter is less than zero, than a random number will be chosen when the file is opened and it will remain unchanged as the problem is repeatedly solved. However, a new random number will be chosen when a file is opened or when EES is restarted. This option makes it possible to create 'quiz' problems with randomized inputs.

Used within Functions and Procedures with the Repeat Until or other logical expressions, the RANDG function can be used to implement Monte Carlo type calculations.

See also: Random