Admin Production ni-theme
Current Publication

OuterProduct

LabWindows/CVI

OuterProduct

Advanced Analysis Library Only

AnalysisLibErrType OuterProduct (double vectorX[], ssize_t numberOfElementsInX, double vectorY[], ssize_t numberOfElementsInY, void *outerProduct);

Purpose

Calculates the outer product of the real input vectors x and y.

Let xi represent the elements of the numberElementsX-element vector x for i = 0, 1, 2, . . ., numberElementsX – 1.

Let yj represent the elements of the numberElementsY-element vector y for j = 0, 1, 2, . . ., numberElementsY – 1.

The outer product of these two vectors is a matrix O of dimensions n-by-m, where the (i, j)th element of O is given by

oi, j = xi × yj

Parameters

Input
Name Type Description
vectorX double [] The first vector used in the calculation of the outer product.
numberOfElementsInX ssize_t The number of elements in vectorX.
vectorY double [] The second vector used in the calculation of the outer product.
numberOfElementsInY ssize_t The number of elements in vectorY.
Output
Name Type Description
outerProduct void * Calculated outer product matrix, as an array of doubles. If vectorX is of dimensions m and vectorY is of dimensions n, the size of the matrix containing the outer product is m-by-n.

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 5.0 and later

Examples

Refer to the following examples that use the OuterProduct function:

  • analysis\2dfft.cws

    Open example
  • OpenMP\2dfft_omp.cws

    Open example