BOOTSTRAP (klibm) functions
LIBRARY ROUTINE
kgen_gauss - generate a vector of gaussian random numbers.
LIBRARY CALL
int kgen_gauss(
int num,
double mean,
double variance,
double *vect)
INPUT
- num - number of elements in vector
- mean - mean of the data set
- variance - variance of the data set
OUTPUT
- vect - a vector containing the generated set of
gaussian random numbers.
RETURN VALUE
TRUE (1) on success, FALSE (0) otherwise
DESCRIPTION
kgen_gauss() generates a one dimensional gaussian random
noise data set.
The formula used to derive the gaussian random
random numbers is the Box-Mueller method and
was taken from Numerical Recipes : The
Art of Scientific Computing (Press, Flannery,
Teukolsky, and Vetterling) 1986.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
Converted from ggauss in Khoros 1.0 (JW)
13-Aug-94 Scott Wilson - fixed bogus u1 generation,
corrected code to use ln instead of log10,
which got rid of Ramiros booger factor.
FILES
$BOOTSTRAP/objects/library/klibm/src/noise.c
SEE ALSO
klibm(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.