QScale1D

Advanced Analysis Library Only

AnalysisLibErrType QScale1D (double inputArray[], int numberOfElements, double outputArray[], double *scalingFactor);

Purpose

Finds the maximum absolute value in the array and produces a scaled array. QScale1D can obtain the element of the scaled array using the following formula:

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

QScale1D determines the constant scale.

Use this function instead of Scale1D, particularly if the expected mean value is 0. QScale1D can perform the operation in place; that is, the input and output arrays can be the same.

Parameters

Input
Name Type Description
inputArray double-precision array Input array used as the basis for quick scaling.
numberOfElements integer Number of elements used to scale the input array.
Output
Name Type Description
outputArray double-precision array Scaled array.
scalingFactor double-precision 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.