FUNCTION REFERENCE
qr
QR factorization by Householder reflections.
QR factorization by Householder reflections.
Syntax
[Q, R] = qr(A)Syntax
[Q, R] = qr(A, 0)Syntax
[Q, R, E] = qr(A)Syntax
[Q, R, p] = qr(A, 0)Syntax
[Q, R, p] = qr(A, 'vector')Syntax
[Q, R, E] = qr(A, 'matrix')Syntax
H = qr(A)Syntax
H = qr(A, 0)A = Q*R with orthogonal Q. qr(A, 0) is the economy size when A has more
rows than columns. With three outputs columns are pivoted by their
remaining norm: A*E = Q*R, or A(:,p) = Q*R with the economy or 'vector' form.
With one output, qr(A) and qr(A, 0) both return the packed m-by-n factorization:
R on and above the diagonal and Householder vectors below it.
Example
[Q, R] = qr([1 2; 3 4]) % R = [-3.1623 -4.4272; 0 -0.6325]Differences from MATLAB: sparse input is not supported. Complex input uses
the same unblocked Householder steps as LAPACK (column pivoting by remaining
norm for three outputs); results whose imaginary parts are all zero are real.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.