Admin Production ni-theme
Current Publication

Reverse

LabWindows/CVI

Reverse

Advanced Analysis Library Only

AnalysisLibErrType Reverse (double inputArray[], ssize_t numberOfElements, double outputArray[]);

Purpose

Reverses the order of the elements of the input array using the following formula:

yi = xn – i – 1

for i = 0, 1, . . ., n – 1

Reverse can perform the operation in place; that is, the input and output arrays can be the same.

The following example uses the Reverse function.

double inputData[10], reverseData[10];
AnalysisLibErrType status;

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

Parameters

Input
Name Type Description
inputArray double [] Input array whose elements are placed in reverse order in the output array.
numberOfElements ssize_t Number of elements to reverse.
Output
Name Type Description
outputArray double [] Reversed array.

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