MATLAB Function Reference
  Go to function:
    Search    Help Desk 
qrinsert    See Also

Insert column in QR factorization

Syntax

Description

[Q,R] = qrinsert(Q,R,j,x) changes Q and R to be the factorization of the matrix obtained by inserting an extra column, x, before A(:,j). If A has n columns and j = n+1, then qrinsert inserts x after the last column of A.

Inputs Q and R represent the original QR factorization of matrix A, as returned by the statement [Q,R] = qr(A). Argument x is the column vector to be inserted into matrix A. Argument j specifies the column before which x is inserted.

Algorithm

The qrinsert function inserts the values of x into the jth column of R. It then uses a series of Givens rotations to zero out the nonzero elements of R on and below the diagonal in the jth column.

See Also

qr          Orthogonal-triangular decomposition

qrdelete    Delete column from QR factorization



[ Previous | Help Desk | Next ]