LabWindows/CVI

Table of Contents

CxMatrixMul

Advanced Analysis Library Only

AnalysisLibErrType CxMatrixMul (void *matrixX, void *matrixY, ssize_t numberOfRowsInX, ssize_t colsRowsInXY, ssize_t numberOfColumnsInY, void *outputMatrix);

Purpose

Multiplies two complex matrices. CxMatrixMul uses the following formula to obtain the output matrix.

i = matrix row index
j = matrix column index
k = number of columns/rows in X/Y

Ensure that the matrix sizes are valid for matrix multiplication. You must meet the following size constraints:

  • matrixX must be n by k.
  • matrixY must be k by m.
  • outputMatrix must be n by m.

Parameters

Input
Name Type Description
matrixX void * First matrix to multiply. The number of columns in matrixX must match the number of rows in matrixY. This matrix must be an array of ComplexNum.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;
double imaginary;
} ComplexNum;

matrixY void * Second matrix to multiply. The number of columns in matrixX must match the number of rows in matrixY. This matrix must be an array of ComplexNum.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;
double imaginary;
} ComplexNum;

numberOfRowsInX ssize_t The number of rows in matrixX.
colsRowsInXY ssize_t The number of columns in matrixX, which must equal the number of rows in matrixY.
numberOfColumnsInY ssize_t Number of columns in matrixY.
Output
Name Type Description
outputMatrix void * Result of the matrix multiplication, 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.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later

Log in to get a better experience

Help us improve your future ni.com experience.

Did you find the documentation you were looking for?

Submit