GaussNoise

Advanced Analysis Library Only

AnalysisLibErrType GaussNoise (int numberOfElements, double sDeviation, int seed, double GaussianNoise[]);

Purpose

Generates an array of random Gaussian numbers distributed with expected zero mean value and the standard deviation you specify.

Example

/* The following code generates an array of random Gaussian distributed numbers. */
double x[20], sDev;
int n;
n = 20;
sDev = 5.0;
GaussNoise (n, sDev, 17, x);

Parameters

Input
Name Type Description
numberOfElements integer Number of elements to generate in the Gaussian noise pattern.
sDeviation double-precision Standard deviation of the Gaussian noise pattern.

Default Value: 1.0.
seed integer Initial seed value.

When seed 0, GaussNoise generates a new random sequence using the seed value. When seed < 0, the previously generated random sequence continues.
Output
Name Type Description
GaussianNoise double-precision array Generated Gaussian noise pattern.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.