GaussNoise
Advanced Analysis Library Only
AnalysisLibErrType GaussNoise (ssize_t numberOfElements, double standardDeviation, int seed, double gaussianNoise[]);
Purpose
Generates an array of random Gaussian numbers distributed with expected zero mean value and the standard deviation you specify.
When seed ≥ 0, GaussNoise generates a new random sequence using the seed value.
When seed < 0, the previously generated random sequence continues.
Example Code
/* 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 | ssize_t | The number of elements to generate in the Gaussian noise pattern. |
standardDeviation | double | Standard deviation of the Gaussian noise pattern. Default Value: 1.0. |
seed | int | The seed value used to generate the random number. 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 [] | 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. |
Additional Information
Library: Advanced Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 3.1 and later