Admin Production ni-theme
Current Publication

Normal1D

LabWindows/CVI

Normal1D

Advanced Analysis Library Only

AnalysisLibErrType Normal1D (double inputArray[], ssize_t numberOfElements, double outputArray[], double *mean, double *standardDeviation);

Purpose

Normalizes a 1D input vector. The output vector has the following form:

where mean and standardDeviation are the mean and the standard deviation of the input vector.

Refer to StdDev for the formulas Normal1D uses to find the mean and the standard deviation.

Normal1D can perform the operation in place; that is, the input and output arrays can be the same.

The following example uses the Normal1D function.

double inputData[10], normalizedData[10];
double mean, standardDeviation;
AnalysisLibErrType status;

// Generate an array of random numbers
status = Uniform (10, 17, inputData);

status = Normal1D (inputData, 10, normalizedData, &mean, &standardDeviation);

Parameters

Input
Name Type Description
inputArray double [] Input vector used as the basis for normalization.
numberOfElements ssize_t Number of elements used in the normalization of the input vector.
Output
Name Type Description
outputArray double [] Normalized vector.
mean double The mean, or average, value used to normalize the vector.
standardDeviation double Standard deviation used to normalize the input vector.

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: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 3.1 and later