GammaNoise
Advanced Analysis Library Only
AnalysisLibErrType GammaNoise (ssize_t numberOfElements, int order, int seed, int initialize, double gammaNoise[]);
Purpose
Generates an array containing a Gamma-distributed pseudorandom pattern of values that are the waiting times that correspond to order. Given the Gamma function,
the probability density function, f(x), of the gammaNoise is
where r is the order.
The following equations define the mean value, µ, and the standard deviation value, σ, of the pseudorandom sequence:
µ = E{x} = r
Example Code
/* The following code generates an array of Gamma-distributed pseudorandom numbers. */
double x[20];
int n, order;
n = 20;
order = 1;
GammaNoise (n, order, 17, TRUE, x);
Parameters
Input | ||
Name | Type | Description |
numberOfElements | ssize_t | The number of elements to generate in the Gamma-distributed pseudorandom pattern. |
order | int | The event number of the unit mean Poisson process. order must be greater than 0. |
seed | int | The seed value used to generate the random number when initialize is a nonzero value. If initialize is a nonzero value, GammaNoise uses seed as follows:
|
initialize | int | Specifies whether to reseed the noise generator. Specify a nonzero value or select Yes in the function panel to initialize the internal seed state according to the value of seed. Specify 0 or select No in the function panel to resume producing noise samples as a continuation of the previously generated noise sequence. |
Output | ||
Name | Type | Description |
gammaNoise | double [] | The output array containing the generated Gamma-distributed pseudorandom 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 2012 and later