<< logm | Linear algebra | orth >> |
[L, U] = lu(A) |
[L, U, P] = lu(A) |
a matrix: square, finite single or double.
Lower triangular factor: matrix (same type A)
Upper triangular factor: matrix (same type A).
Row permutation: matrix (same type A).
[L, U] = lu(A) function decomposes a full matrix A into two matrices: an upper triangular matrix U and a permuted lower triangular matrix L.
This factorization satisfies the equation A = L * U.
[L, U, P] = lu(A) function, when used with three output arguments, provides a permutation matrix P in addition to the unit lower triangular matrix L and the upper triangular matrix U.
This factorization is expressed as A = P'LU, where L is unit lower triangular, and U is upper triangular.
A = magic(5)
[L, U] = lu(A)
L * U
A = magic(5)
[L, U, P] = lu(A);
subplot(1, 2, 1)
spy(L)
title(_('L factor'))
subplot(1, 2, 2)
spy(U)
title(_('U factor'))
cond.
Version | Description |
---|---|
1.1.0 | initial version |
Allan CORNET