A type of QR Decomposition

skyhr

New member
Joined
Sep 7, 2009
Messages
8
Hello,

I am reading a research paper in which a certain algorithm involves the QR Decomposition. This QR decomposition is different from the Matlab version: In Matlab, [B,C] = qr(Matrix of size n x u) returns B => u x u orthogonal matrix and C => n x u upper triangular matrix. The QR Decomposition in the research paper, however, is different. Here, [B,C] = qr(Matrix of size n x u) returns B => n x u matrix of orthogonal columns and C => u x u sized upper triangular matrix.

How can I use Matlab to produce the second type of QR decomp?

Thanks
 
This makes no sense, an upper triangular matrix is square by definition.

Either way, any upper triangular matrix can be represented by a product of elementary (upper triangular) matricies. Multiply one matrix by the elementary matricies of the other and I suppose you'll get the result.
 
I know it doesn't make much sense, but it is what Matlab gives me:

=== Matlab ===
>> a = magic(4);
>> a:),1)=''

a =

2 3 13
11 10 8
7 6 12
14 15 1

>> [b,c]=qr(a)

b =

-0.1040 0.5061 -0.8265 -0.2236
-0.5719 -0.4709 -0.0349 -0.6708
-0.3639 -0.4817 -0.4307 0.6708
-0.7278 0.5386 0.3609 0.2236


c =

-19.2354 -19.1314 -11.0214
0 1.9973 -2.4303
0 0 -15.8311
0 0 0


==== End Matlab ===

B should be n x u and c should be square matrix, but Matlab doesn't give me this.

How can I fix this?

Thanks
 
Top