qre#
Purpose#
Computes the orthogonal-triangular (QR) decomposition of a matrix x, such that:
Format#
- { r, e } = qre(x)#
- Parameters:
x (NxP matrix) – data
- Returns:
r (KxP upper triangular matrix) –
.e (Px1 vector) – permutation vector
Remarks#
qre()
is the same as qqre()
but doesn’t return the qre()
will save a significant amount of time and memory usage, especially for large problems.
Given
where
where
is the QR decomposition of
qre()
does not return the qqre()
. If you need the entire qyre()
with qtyre()
and qyre()
.
If
where
where
and
that is,
If
where
it can be shown that
b = qrsol(Q'Y, R1)|zeros(N-P,1);
The explicit formation here of qtyre()
.
For further discussion of QR factorizations see the remarks under qqr()
.
Source#
qr.src