Admin Production ni-theme
Current Publication

Mul1D

LabWindows/CVI

Mul1D

AnalysisLibErrType Mul1D (double arrayX[], double arrayY[], ssize_t numberOfElements, double outputArray[]);

Purpose

Multiplies two 1D arrays, element by element. Mul1D obtains the ith element of the output array using the following formula:

zi = xi × yi

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

The following example uses the Mul1D function.

double arrayX[10], arrayY[10], outputArray[10];
AnalysisLibErrType status;

// Generate two arrays of random numbers
status = Uniform (10, 17, arrayX);
status = Uniform (10, 34, arrayY);
status = Mul1D (arrayX, arrayY, 10, outputArray);

Parameters

Input
Name Type Description
arrayX double [] The first array used in the array multiplication operation.
arrayY double [] The second array used in the array multiplication operation.
numberOfElements ssize_t Number of elements to multiply.
Output
Name Type Description
outputArray double [] The result of the array multiplication.

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 Mul1D function:

  • analysis\parsevls.cws

    Open example
  • analysis\transmit.cws

    Open example