next up previous contents
Next: Streams Up: Sampling From Statistical Distributions Previous: Sampling from a Normal   Contents

Sampling from a Uniform Distribution

To sample from a uniform distribution, use the uniform(min, max, stream) function. The following returns a value from a uniformly distributed set with a minimum of $32.12$ and a maximum of $55.23$ using stream $10$.

double j = samplesource.uniform(32.12, 55.23, 10);



Hydroponics 2002-06-08