Advanced Analysis Library Only
AnalysisLibErrType Scale2D (void *inputArray, int numberRows, int numberColumns, void *outputArray, double *offsetValue, double *scalingFactor);
Scales the input array and returns the scale and offset constants. The scaled output array is in the range [1 : 1]. Scale2D can obtain the (i, j)th element of the scaled array using the following formulas:
offset = min + scale
where max and min are the maximum and minimum values in the input array, respectively.
You can use LinEv2D to reconstruct the input array using the scale and offset constants. Scale2D can perform the operation in place; that is, the input and output arrays can be the same.
Input | ||
Name | Type | Description |
inputArray | numeric array | Input array used as the basis for the scaling operation. This matrix must be an array of doubles. |
numberRows | integer | Number of rows used in the scaling operation. |
numberColumns | integer | Number of columns used in the scaling operation. |
Output | ||
Name | Type | Description |
outputArray | numeric array | Scaled array, as an array of doubles. |
offsetValue | double-precision | Offsetting constant of the input array. |
scalingFactor | double-precision | Scaling constant of the input array. |
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |