Admin Production ni-theme
Current Publication

LinEv1D

LabWindows/CVI

LinEv1D

AnalysisLibErrType LinEv1D (double inputArray[], ssize_t numberOfElements, double multiplier, double additiveConstant, double outputArray[]);

Purpose

Performs a linear evaluation of a 1D array.

LinEv1D obtains the ith element of the output array, using the following formula:

yi = (a × xi) + b

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

The following example uses the LinEv1 function.

double inputData[10], linearData[10];
double multiplier, additiveConstant;
AnalysisLibErrType status;

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

status = LinEv1D(inputData, 10, multiplier, additiveConstant, linearData);

Parameters

Input
Name Type Description
inputArray double [] The array used as the basis for the linear evaluation.
numberOfElements ssize_t Number of elements used in the linear evaluation of the input array.
multiplier double Multiplicative constant used in the linear evaluation of the input array.

Default Value: 1.0.
additiveConstant double Additive constant used in the linear evalution of the input array.

Default Value: 0.0.
Output
Name Type Description
outputArray double [] The linear evaluation 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.

Additional Information

Library: Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Examples

Refer to the following examples that use the LinEv1D function:

  • analysis\cxwindowing.cws

    Open example
  • analysis\windowng.cws

    Open example
  • apps\freqresp\freqresp.cws

    Open example