Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Downdating the QR factorization.

Subject: Downdating the QR factorization.

From: Alberto

Date: 22 Nov, 2010 11:51:04

Message: 1 of 3

Suppose that A = QR is a full QR factorization of A; that is, Q is (m x m) and R is
(m x n). Then, we can write Aj = QRj , where Rj is the matrix obtained by eliminating
the j-th column from R (as above). Using this fact and the particular structure of zeros
of Rj , write the function:
function [Qnew,Rnew] = downqr(Q,R,j)
%
% [Qnew,Rnew] = downqr(Q,R,j)
%
% Given a full QR factorization of A (m x n) with m>= n,
% it obtains the full QR factorization of
%
% A(:,[1:j-1,j+1:n]) = Qnew*Rnew
%
% WITHOUT constructing the matrix A.

Apply Matlab’s function qr over n - j carefully chosen (2 x 1) submatrices of
(what initially is) Rj . Apply the obtained (2 x 2) matrix Q on the appropriate
submatrices of (what initially is) the original Q and Rj so they get transformed
progressively into QNEW and RNEW. Do not use qr on matrices larger than (2 x 1)!
 The function downqr must be faster than the command qr(Aj). To check that, you must
generate 10 random matrices A of sizes (100 k) x (50 k) for k = 1 : 10 (use the command
randn). For each of those matrices, compute [Q,R] =qr(A), and compare the CPU time
(in seconds) needed by downqr(Q,R,j) and qr(Aj) for j = 16 (use cputime).
You must write the script compartime that plots the CPU time needed for downqr(Q,R,j)
(red circles) and for qr(Aj) (blue crosses) as a function of the parameter k.

Subject: Downdating the QR factorization.

From: Stefan

Date: 22 Nov, 2010 12:15:04

Message: 2 of 3


Homework?

"Alberto " <belloto123@gmail.com> wrote in message <icdlf8$q7l$1@fred.mathworks.com>...
> Suppose that A = QR is a full QR factorization of A; that is, Q is (m x m) and R is
> (m x n). Then, we can write Aj = QRj , where Rj is the matrix obtained by eliminating
> the j-th column from R (as above). Using this fact and the particular structure of zeros
> of Rj , write the function:
> function [Qnew,Rnew] = downqr(Q,R,j)
> %
> % [Qnew,Rnew] = downqr(Q,R,j)
> %
> % Given a full QR factorization of A (m x n) with m>= n,
> % it obtains the full QR factorization of
> %
> % A(:,[1:j-1,j+1:n]) = Qnew*Rnew
> %
> % WITHOUT constructing the matrix A.
>
> Apply Matlab’s function qr over n - j carefully chosen (2 x 1) submatrices of
> (what initially is) Rj . Apply the obtained (2 x 2) matrix Q on the appropriate
> submatrices of (what initially is) the original Q and Rj so they get transformed
> progressively into QNEW and RNEW. Do not use qr on matrices larger than (2 x 1)!
> The function downqr must be faster than the command qr(Aj). To check that, you must
> generate 10 random matrices A of sizes (100 k) x (50 k) for k = 1 : 10 (use the command
> randn). For each of those matrices, compute [Q,R] =qr(A), and compare the CPU time
> (in seconds) needed by downqr(Q,R,j) and qr(Aj) for j = 16 (use cputime).
> You must write the script compartime that plots the CPU time needed for downqr(Q,R,j)
> (red circles) and for qr(Aj) (blue crosses) as a function of the parameter k.

Subject: Downdating the QR factorization.

From: Edwin

Date: 24 Nov, 2010 22:53:04

Message: 3 of 3

if input functions is Q and R? how compare this?

I supose there are a Q and R. Start by deleting a column of R and then proceed to construct a lower triangular matrix with householder.

the statement is not clear. More data?

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us