Uniform
Advanced Analysis Library Only
AnalysisLibErrType Uniform (ssize_t numberOfElements, int seed, double noise[]);
Purpose
Generates an array of random numbers that are distributed uniformly between zero and one.
When seed ≥ 0, Uniform 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 numbers between 0 and 1. */
double x[20];
int n;
n = 20;
Uniform (n, 17, x);
Parameters
Input | ||
Name | Type | Description |
numberOfElements | ssize_t | The number of elements to generate in the uniform noise pattern. |
seed | int | The seed value used to generate the random number. When seed ≥ 0, Uniform generates a new random sequence using the seed value. When seed < 0, the previously generated random sequence continues. |
Output | ||
Name | Type | Description |
noise | double [] | The generated uniform noise pattern between 0 and 1. |
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