Chapter 3 Analysis Library
© National Instruments Corporation 3-29 LabWindows/CVI Standard Libraries
Sortint status = Sort (double inputArray[], int numberofElements, int direction,
double outputArray[]);
Purpose
Sorts the input array in ascending or descending order. The function performs the operation in
place; that is, inputArray and outputArray can be the same array.
Parameters
Input inputArray double-precision
array Input array.
numberofElements integer Number of elements to be
sorted.
direction integer 0: ascending.
Non-zero: descending.
Output outputArray double-precision
array Sorted array.
Return Value
status integer Refer to error codes in
Table 3-2.
StdDevint status = StdDev (double inputArray[], int numberofElements, double *mean,
double *standardDeviation);
Purpose
Computes the standard deviation and the mean (average) values of the input array. The formulas
used to find the mean and the standard deviation are as follows.
meanval x n
i
i
n
=
=
−
∑
0
1/
sDev = [x - ave] / n
i=0
n-1
i2
∑