LU factorization with decreasing elements on the main diagonal of U
1 回表示 (過去 30 日間)
古いコメントを表示
Does
select P so that
is decreasing?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1492132/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1492142/image.png)
If not, how can I request it?
0 件のコメント
回答 (1 件)
Bruno Luong
2023 年 9 月 25 日
編集済み: Bruno Luong
2023 年 9 月 25 日
Obviously not
A=[1 10 9;
5 1 9;
2 8 1]
[L,U,P]=lu(A)
But you can fix the progression of abs(diag(U)) in any arbitray decrasing sequance you want, just scale appropiately L.
Here I select the sequene of U(1,1).*2.^(-(1:n-1))
% Fix it, assuming A is not singular
Ukk = abs(U(1,1));
for k=2:size(U,1)
s = Ukk/(2*abs(U(k,k)));
U(k,:) = s*U(k,:);
L(:,k) = L(:,k)/s;
Ukk = abs(U(k,k));
end
L
U
P'*L*U % close to A
In some sense the question of scaling U alone is trivial and sort of useless if you don't specify what L should be.
Note that MATLAB returns L such that diag(L) are 1.
5 件のコメント
参考
カテゴリ
Help Center および File Exchange で Operating on Diagonal Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!