Updating thin QR factorization
Updating the thin QR factorization of A when A is modified. These functions run faster than qr when the dimension of A is large, such as 5000-by-50.
Rank one update: rankoneupdate(Q, R, v, u):
Update the thin QR factorization of A when A = A + vu'.
Example:
A = rand(5,3);
v = rand(5,1);
u = rand(3,1);
[Q, R] = qr(A,0);
[Q_1, R_1] = rankoneupdate(Q, R, v, u);
Deleting a row: deleterow(Q, R, k)
Update the thin QR factorization of A when the kth row of A is deleted.
Example:
A = rand(5,3);
[Q, R] = qr(A, 0);
[Q_1, R_1] = deleterow(Q, R, 3);
Deleting a column: deletecolumn(Q, R, k)
Update the thin QR factorization of A when the kth column of A is deleted.
Example:
A = rand(5,3);
[Q, R] = qr(A, 0);
[Q_1, R_1] = deletecolumn(Q, R, 2);
Inserting a row: insertrow(Q, R, u, k)
Update the thin QR factorization of A when vector u is inserted as the kth row of A.
Example:
A = rand(5, 3);
[Q, R] = qr(A,0);
u = rand(3, 1);
[Q_1, R_1] = insertrow(Q, R, u, 2);
Inserting a row: insertcolumn(Q, R, u, k)
Update the thin QR factorization of A when vector u is inserted as the kth column of A.
Example:
A = rand(5, 3);
[Q, R] = qr(A,0);
u = rand(5, 1);
[Q_1, R_1] = insertcolumn(Q, R, u, 2);
Cite As
Meimei Chen (2026). Updating thin QR factorization (https://www.mathworks.com/matlabcentral/fileexchange/90835-updating-thin-qr-factorization), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
