Performs the QR decomposition of a matrix with the option of column pivoting.
An m-by-n matrix, where m is the number of rows in the matrix and n is the number of columns in the matrix.
This input accepts a 2D array of double-precision, floating point numbers or 2D array of complex double-precision, floating point numbers.
The matrix can be either a square or rectangular matrix.
A Boolean that specifies whether the node uses column pivoting to decompose the input matrix.
|True||Uses column pivoting. The following equation decomposes the matrix A: AP = QR. The node returns the absolute values of the diagonals of matrix R in descending order.|
|False||Does not use column pivoting. The following equation decomposes the matrix A: A = QR.|
A value that specifies how the node generates the Q matrix.
This input must take one of the following values, where m is the number of rows in matrix A, and n is the number of columns in matrix A.
|Full Size Q||0||The size of matrix Q is m-by-m, and the size of matrix R is m-by-n.|
|Economy Size Q||1||The size of matrix Q is m-by-min(m, n), and the size of matrix R is min(m, n)-by-n.|
|No Q||2||The node does not generate matrix Q, and the size of matrix R is min(m, n)-by-n.|
Default: Full Size Q
Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.
Default: No error
The orthogonal matrix.
The upper triangular matrix.
The n-by-n permutation matrix, where n is the number of columns in the input matrix.
If pivot? is False, this output is an empty array.
Error information. The node produces this output according to standard error behavior.
The following equation defines the QR decomposition:
You can use QR decomposition to calculate the determinant of a square matrix. For example, consider the following equation: det(A) = det(Q)*det(R). Because Q is orthogonal, the following is true: |det(Q)| = 1. Thus, the following also is true:
You also can use QR decomposition to solve the least-squares problem of a linear equation Ax = b when A is full rank and m ≥ n. For example, consider the following equation:
where the following are true:
Because min(||b - Ax||2) depends on min(||Q1Tb - R1x||2), you can obtain the solution x by solving the following new linear equation: R1x = Q1Tb.
Where This Node Can Run:
Desktop OS: Windows
FPGA: Not supported