Matlab build in qr decomposition

2 次查看(过去 30 天)
Pierce Chuang
Pierce Chuang 2011-5-17
Hi,
I am working on a project which requires qr decomposition of a square matrix (Matlab version 2010B). Matlab has a built-in qr decomposition function which will generate a upper triangular matrix with abs(diag®) decreasing. I am just curious if there is any way to modify it such that abs(diag®) will be increasing instead.
I tried permuting the columns of the matrix in all combination was not able to achieve abs(diag®)increasing. I notice that I can achieve this by modifying Gram-Schmidt algorithm [1]. However, the upper triangular matrix that I get from this algorithm produces a 5X worse performance result compared to the one that is generated from the Matlab built-in function. I understand that QR decomposition is not unique, but I was also puzzling why such a significant performance difference is observed.
Any suggestions is truly appreciated.
Pierce
[1] D. Wubben, et. al, "Efficient algorithm for decoding Layered Space-Timed Codes"

回答(1 个)

Ivan van der Kroon
Ivan van der Kroon 2011-5-17
It is very hard to make an algorithm more efficient than Matlab-build in codes. But you can use some straigth-forward linear algebra. If you are looking for the decomposition of A, such that A=Q*R you can modify this to A=Q*B*inv(B)*R for any matrix B. The new Q'=Q*B and the new R'=inv(B)*R conserving A=Q'*R' (no transposes or anything, just denoting new matrices).
Now by choosing B accordingly (probably diagonal) you can change the order of diag (R). Watch out that you keep Q' unitary if that is important in your case!

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by