Something wrong with Matlab's LU decomposition:

3 visualizaciones (últimos 30 días)
Li Kiera
Li Kiera el 18 de Dic. de 2023
Comentada: David Goodmanson el 11 de En. de 2024
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 comentario
David Goodmanson
David Goodmanson el 11 de En. de 2024
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by