Skip to content

qrdelete

linear-algebra · scripts/linear-algebra/qrdelete.m

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

Update a QR factorization after removing a column or row from the factored matrix.

The inputs Q and R are the factors of some matrix A = Q*R, as produced by qr. With orient omitted or equal to "col", return the factorization of the matrix obtained by deleting column j from A; with orient equal to "row", return the factorization of A with row j deleted.

On return, Q1 has orthonormal columns and R1 is upper trapezoidal, so that Q1*R1 equals A with the selected column or row removed.

The index j must be a positive integer no larger than the number of columns (respectively rows) of A.