CxQR

Advanced Analysis Library Only

AnalysisLibErrType CxQR (void *inputMatrix, int numberOfRows, int numberOfColumns, void *QMatrix, void *RMatrix);

Purpose

Note  This function is obsolete. National Instruments recommends that you use CxQREx instead.

Calculates the QR factorization of the complex input matrix. The input matrix can be square or rectangular.

The following formula defines the QR factorization of a n-by-m matrix A such that:

A = QR

where Q is an orthogonal matrix of dimensions n-by-n
R is an upper triangular matrix of dimensions n-by-m
n is the number of rows
m is the number of columns

In general, QR factorization can be calculated in many different ways. In CxQR, QR factorization uses the Householder algorithm. You can use QR factorization to solve linear systems with more equations than unknowns.

Parameters

Input
Name Type Description
inputMatrix numeric array Input complex matrix. This matrix must be an array of ComplexNum.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

numberOfRows integer Number of rows in inputMatrix.
numberOfColumns integer Number of columns in inputMatrix.
Output
Name Type Description
QMatrix numeric array Calculated orthogonal matrix of the QR factorization, as an array of ComplexNum.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

RMatrix numeric array Calculated upper triangular matrix of the QR factorization, 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.