Advanced Analysis Library Only
AnalysisLibErrType QR (void *inputMatrix, int numberOfRows, int numberOfColumns, int algorithm, void *QMatrix, void *RMatrix);
![]() |
Note This function is obsolete. National Instruments recommends that you use QREx instead. |
Calculates the QR factorization of the real input matrix. The input matrix can be square or rectangular.
The following formula defines the QR factorization of a n-by-m matrix A:
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 |
QR can calculate factorization in many ways. QR provides three methods for the factorization: Householder, Givens, and Fast Givens. You can use QR factorization to solve linear systems with more equations than unknowns.
Input | ||||||||||
Name | Type | Description | ||||||||
inputMatrix | numeric array | Input real matrix. The input matrix can be either square or rectangular. This matrix must be an array of doubles. | ||||||||
numberOfRows | integer | Number of rows in inputMatrix. | ||||||||
numberOfColumns | integer | Number of columns in inputMatrix. | ||||||||
algorithm | integer | Algorithm to use. The following table shows valid algorithm values for the factorization methods.
|
||||||||
Output | ||||||||||
Name | Type | Description | ||||||||
QMatrix | numeric array | Calculated orthogonal matrix of the QR factorization, as an array of doubles. | ||||||||
RMatrix | numeric array | Calculated upper triangular matrix of the QR factorization, as an array of doubles. |
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |