Something wrong with Matlab's LU decomposition:

조회 수: 4 (최근 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 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