# Sum2D

Advanced Analysis Library Only

AnalysisLibErrType Sum2D (void *inputArray, int numberRows, int numberColumns, double *sum);

## Purpose

Finds the sum of the elements in the input 2D array. Sum2D obtains the sum using the following formula:

where i is the array row index, j is the array column index, n is numberRows, and m is numberColumns.

## Parameters

Input
Name | Type | Description
inputArray | numeric array | Input array whose elements are summed. This matrix must be an array of doubles.
numberRows | integer | Number of rows used in generating the sum of elements.
numberColumns | integer | Number of columns used in generating the sum of elements.
Output
Name | Type | Description
sum | double-precision | Sum of the 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.