From: jamuna ramesh on 15 Apr 2010 07:57 "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hq1dmk$5tb$1(a)fred.mathworks.com>... > "jamuna ramesh" <jamram_k(a)yahoo.co.in> wrote in message <hq1con$oaj$1(a)fred.mathworks.com>... > > hai > > assume A is a one rectangular matrix size of (m x n). By decomposition, which is divided into 3 matrix, Lower triangular matrix L11 (n x n), Upper triangular matrix U11 (n x n) and L21 rectanugular matix (m xn). [L11; L21 ] *U11 will get actual matrix A matrix. > > How can i arrive L11 L21 and U11????????????????????????? > > > > I assume the size of L21 is (m-n) x (n), otherwise the dimension do not match. > > Well, just call LU on the first n-rows of A, then solve linear system for L21. > > Example: > > >> A=rand(5,3) > A = > > 0.0536 0.7411 0.8776 > 0.5365 0.5665 0.1244 > 0.7572 0.2178 0.0795 > 0.1169 0.5760 0.9499 > 0.3488 0.3651 0.5960 > > % Engine > >> [m n]=size(A); > >> [L11 U11]=lu(A(1:n,:)); > >> L12=A(n+1:end,:)/U11; > > >> L=[L11; L12]; > > % Check > >> L*U11 > > ans = > > 0.0536 0.7411 0.8776 > 0.5365 0.5665 0.1244 > 0.7572 0.2178 0.0795 > 0.1169 0.5760 0.9499 > 0.3488 0.3651 0.5960 > > >> norm(L*U11-A)/norm(A) > > ans = > > 2.9560e-017 > > >> > > % Bruno dear friend thanks for reply. A is a sparse matrix. A=[He;Hr]; By triangular factorization and row pivoting A=[Le;Mr]*Ue; Le and Ue are lower and upper triangular matices and Mr is sparse rectangular matrix. But diagonal of Le is not unit. please help jamuna
From: Bruno Luong on 15 Apr 2010 08:12
> A=[Le;Mr]*Ue; Le and Ue are lower and upper triangular matices and Mr is sparse rectangular matrix. > But diagonal of Le is not unit. The easy fix is: let's d = diag(Le); % assume d(k) ~= 0 for all k D = diag(d); Then A = [Le;Mr]*inv(D)*D*Ue; So Lu := [Le;Me]*inv(D) is a lower triangular matrix with unit on diagonal and Un := D*Ue is upper triangular, and A = Lu*Un This decomposition is what you wanted (I hope). Bruno |