Sum1D
Advanced Analysis Library Only
AnalysisLibErrType Sum1D (double inputArray[], ssize_t numberOfElements, double *sum);
Purpose
Finds the sum of the elements of the input array. Sum1D obtains the sum of the elements using the following formula:

The following example uses the Sum1D function.
double inputData[10];
double Sum;
AnalysisLibErrType status;
// Generate an array of random numbers
status = Uniform (10, 17, inputData);
status = Sum1D (inputData, 10, &Sum);
Parameters
Input | ||
Name | Type | Description |
inputArray | double [] | Input array whose elements are summed. |
numberOfElements | ssize_t | Number of elements to sum. |
Output | ||
Name | Type | Description |
sum | double | Sum of elements of the input 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
Example
Refer to analysis\parsevls.cws for an example of using the Sum1D function.