CxOuterProduct

Advanced Analysis Library Only

AnalysisLibErrType CxOuterProduct (ComplexNum vectorX[], int numberElementsX, ComplexNum vectorY[], int numberElementsY, void *outerProduct);

Purpose

Calculates the outer product of the complex 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 ComplexNum array First vector used to compute the outer product.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

numberElementsX integer Number of elements in vectorX.
vectorY ComplexNum array Second vector used to compute the outer product.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

numberElementsY integer Number of elements in vectorY.
Output
Name Type Description
outerProduct numeric array Calculated outer product matrix, as an array of ComplexNum.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

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.