# QScale2D

Advanced Analysis Library Only

AnalysisLibErrType QScale2D (void *inputArray, int numberRows, int numberColumns, void *outputArray, double *scalingFactor);

## Purpose

Scales a 2D input array by its maximum absolute value. QScale2D can obtain the (i, j)th element of the scaled array using the following formula:

where scale is the maximum absolute value of the input array.

QScale2D determines the constant scale.

You can use this function instead of Scale2D, particularly if the expected mean value is 0. QScale2D can perform the operation in place; that is, the input and output arrays can be the same.

## Parameters

Input
Name | Type | Description
inputArray | numeric array | Input array used as the basis for quick scaling. 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.
scalingFactor | double-precision | The maximum absolute value in 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.