Admin Production ni-theme
Current Publication

PoissonNoise

LabWindows/CVI

PoissonNoise

Advanced Analysis Library Only

AnalysisLibErrType PoissonNoise (ssize_t numberOfElements, double mean, int seed, int initialize, double poissonNoise[]);

Purpose

Generates an array containing a Poisson-distributed pseudorandom pattern of values that are the number of discrete events that occur in the interval specified by mean of a unit rate Poisson process. The following equation defines the probability density function of the poissonNoise:

where λ is the mean.

The following equations define the mean value, µ, and the standard deviation value, σ, of the pseudorandom sequence:

µ = E{x} = λ

σ = [E{(x – µ)2}]1/2 =

Poisson noise is the result of the Poisson process. You can use the Poisson process to describe the probability of a certain number of events happening in a given period of time. For example, you can use the Poisson process to describe the nuclear decay of atoms and the number of messages a transmitting station receives.

Example Code

/* The following code generates an array of Poisson-distributed pseudorandom numbers. */
double x[20], mean;
int n;
n = 20;
mean = 1;
PoissonNoise (n, mean, 17, TRUE, x);

Parameters

Input
Name Type Description
numberOfElements ssize_t The number of elements to generate in the Poisson-distributed pseudorandom pattern.
mean double The interval of a unit rate Poisson process.

mean must be greater than or equal to 0.

seed int The seed value used to generate the random number when initialize is a nonzero value.

If initialize is a nonzero value, PoissonNoise uses seed as follows:

  • When seed ≥ 0, PoissonNoise generates a new random sequence using the seed value you specify.

  • When seed < 0, PoissonNoise uses a random number to generate the internal seed state.
If initialize if 0, PoissonNoise ignores seed and generates the sequence as a continuation of the previously generated noise sequence.
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
poissonNoise double [] The output array containing the generated Poisson-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