[討論] Householder Reflection: a 3x3 Matrix …

看板NCTU-STAT99G作者 (aluba1)時間13年前 (2011/05/20 00:53), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
The following is a algorithm to transform an matrix A to an upper triangular one by Householder reflection: p1=0.9 p2=p1*p1 A=[1 p1 p2; p1 1 p1; p2 p1 1] u=[A(1,1); A(2,1); A(3,1)] u=u-norm(u)*[1;0;0] v=u/norm(u) I=eye(3) % a 3x3 identity matrix. Q=I-2*v*v' A=Q*A A1=[A(2,2) A(2,3); A(3,2) A(3,3)] u=[A1(1,1); A1(2,1)] u=u-norm(u)*[1;0] v=u/norm(u) I=eye(2) % a 2x2 identity matrix. Q=I-2*v*v' Q=[1 0 0; 0 Q(1,1) Q(1,2); 0 Q(2,1) Q(2,2)] A=Q*A Please copy them line by line into matlab command window to see the result. Also see the relevant wiki webpage to get better understanding. http://en.wikipedia.org/wiki/QR_decomposition aluba1 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.195.2.128 ※ 編輯: aluba1 來自: 123.195.2.128 (05/20 21:09)
文章代碼(AID): #1DrKiQy1 (NCTU-STAT99G)