Scale1D

Advanced Analysis Library Only

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

Purpose

Scales the input array and returns the scale and offset constants. The scaled output array is in the range [–1:1]. Scale1D can obtain the 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 LinEv1D to reconstruct the input array using the scale and offset constants. Scale1D 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 the scaling operation.
numberOfElements integer Number of elements used to perform the scaling operation.
Output
Name Type Description
outputArray double-precision array Scaled array.
offsetValue double-precision Offsetting constant of the input array.
scalingFactor double-precision Scaling constant 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.