gaussRandom

[ XITE Reference Manual | XITE home ]

Name

gaussRandom - random function with gaussian distribution

Syntax

 #include <xite/utils.h>

 double gaussRandom( double my, double sigma );

Description

gaussRandom returns a random varable of type double with gaussian distribution, mean value my, and standard deviation sigma. The C library routine random is used for random number generation, the user must call the initialization routine srandom once before starting to call gaussRandom. Using a fixed number (int) as input to srandom enables you to reproduce the random sequence, otherwise time(0) may be used as argument.

Return value

The random variable of type double.

Author

Tor L|nnestad, BLAB, ifi, UiO

Id

$Id: gaussfunc.c,v 1.14 1995/08/23 14:58:40 svein Exp $