Navigation

Operators and Keywords

Function List:

C++ API

: [Q1, R1] = qrinsert (Q, R, j, x, orient)

Given a QR factorization of a real or complex matrix A = Q*R, Q unitary and R upper trapezoidal, return the QR factorization of [A(:,1:j-1) x A(:,j:n)], where u is a column vector to be inserted into A (if orient is "col"), or the QR factorization of [A(1:j-1,:);x;A(:,j:n)], where x is a row vector to be inserted into A (if orient is "row").

The default value of orient is "col". If orient is "col", u may be a matrix and j an index vector resulting in the QR factorization of a matrix B such that B(:,j) gives u and B(:,j) = [] gives A. Notice that the latter case is done as a sequence of k insertions; thus, for k large enough, it will be both faster and more accurate to recompute the factorization from scratch.

If orient is "col", the QR factorization supplied may be either full (Q is square) or economized (R is square).

If orient is "row", full factorization is needed.

See also: qr, qrupdate, qrdelete, qrshift.

Package: octave