Div2D
AnalysisLibErrType Div2D (void *arrayX, void *arrayY, ssize_t numberOfRows, ssize_t numberOfColumns, void *outputArray);
Purpose
Divides two 2D arrays, element by element. Div2D obtains the (i, j)th element of the output array using the following formula:

Div2D can perform the operation in place; that is, the input and output arrays can be the same.
The following example uses the Div2D function.
double arrayX[10][10], arrayY[10][10], outputArray[10][10];
int i, j, numRows, numCols;
AnalysisLibErrType status;
numRows = 10;
numCols = 10;
/* Use a For loop to generate two 2D arrays of random numbers between 0.0 and 1.0 */
for (j = 0; j < 10; j++)
for (i = 0; i < 10; i++)
{
arrayX[i][j] = Random(0.0, 1.0);
arrayY[i][j] = Random(0.0, 1.0);
}
status = Div2D(arrayX, arrayY, numRows, numCols, outputArray);
Parameters
Input | ||
Name | Type | Description |
arrayX | void * | The dividend array of the array division operation. This array must be an array of doubles. |
arrayY | void * | The divisor array of the array division operation. This array must be an array of doubles. |
numberOfRows | ssize_t | Number of rows used in the array division operation. |
numberOfColumns | ssize_t | Number of columns used in the array division operation. |
Output | ||
Name | Type | Description |
outputArray | void * | Result array, which is an array of doubles. |
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