Something wrong with Matlab's LU decomposition:

2 ビュー (過去 30 日間)
Li Kiera
Li Kiera 2023 年 12 月 18 日
コメント済み: David Goodmanson 2024 年 1 月 11 日
Example:
A=[-1.0000 0.1667 -2.9897
0.3624 -1.0604 -0.5243
4.0990 -4.5547 7.0303]
[L,U]=lu(A)
L=[-0.2440 1.0000 0
0.0884 0.6964 1.0000
1.0000 0 0]
U=[4.0990 -4.5547 7.0303
0 -0.9445 -1.2746
0 0 -0.2583]
A correct answer is
L=[1.0000 0 0
-0.3624 1.0000 0
-4.0990 3.8714 1.0000]
U=[-1.0000 0.1667 -2.9897
0 -1.0000 -1.6078
0 0 1.0000]
  1 件のコメント
David Goodmanson
David Goodmanson 2024 年 1 月 11 日
Hi LK
There is nothing really wrong here. 'help lu' tells you that [L U] = lu(A) gives a row-permuted L matrix (it's not necessarily lower triangular any more) so that A = LU. The command [L U P] = lu(A) gives a true lower triangular matrix L and a permutation matrix P such that PA = LU, or (since P' is the inverse of P), A = P'LU. All of this done to allow pivoting so that the computed L and U have maximal numerical accuracy.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by