Advanced Analysis Library Only
AnalysisLibErrType OuterProduct (double vectorX[], int numberElementsX, double vectorY[], int numberElementsY, void *outerProduct);
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
Input | ||
Name | Type | Description |
vectorX | double-precision array | The first vector used in the calculation of the outer product. |
numberElementsX | integer | Number of elements in vectorX. |
vectorY | double-precision >array | The second vector used in the calculation of the outer product. |
numberElementsY | integer | Number of elements in vectorY. |
Output | ||
Name | Type | Description |
outerProduct | numeric array | 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. |
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |