Admin Production ni-theme
Current Publication

Set1D

LabWindows/CVI

Set1D

AnalysisLibErrType Set1D (double array[], ssize_t numberOfElements, double setValue);

Purpose

Sets the elements of an array to a specified constant value.

The following example uses the Set1D function.

double inputArray [10];
AnalysisLibErrType status;

// Generate an array of random numbers
status = Uniform (10, 17, inputArray);

status = Set1D (inputArray, 10, 5.0);

Parameters

Input
Name Type Description
numberOfElements ssize_t Number of elements in the array.
setValue double The constant value to assign to the elements of the input array.

Default Value: 0.0
Output
Name Type Description
array double [] The array to set.

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: Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Example

Refer to analysis\pulse.cws for an example of using the Set1D function.