Owning Class: linalgebra
Requires: MathScript RT Module
l = lu(a)
[l, u] = lu(a)
[l, u, p] = lu(a)
Decomposes a matrix into upper and lower triangular or trapezoidal matrices using Gaussian factorization.
| Name | Description |
|---|---|
| a | Specifies an m-by-n matrix. |
| Name | Description |
|---|---|
| l | If you specify [l, u, p] = lu(a), l returns the lower triangular matrix with 1 on the diagonal such that l*u = p*a. If m > n, l returns the lower trapezoidal matrix. l is an m-by-min(m, n) matrix. If you specify [l, u] = lu(a), l returns a matrix equal to p'*b, where b is the lower triangular matrix with 1 on the diagonal. If m > n, l returns a matrix equal to p'*b, where b is the lower trapezoidal matrix with 1 on the diagonal. l is an m-by-min(m, n) matrix. If you specify l = lu(a), l returns the strict lower triangle of the lower triangular matrix and the upper triangle of u in the same matrix. If m > n, l returns the strict lower triangle of the lower trapezoidal matrix and the upper triangle of u in the same matrix. l is a matrix of the same size as a. |
| u | Returns an upper triangular matrix such that l*u = p*a. If m < n, l returns an upper trapezoidal matrix. u is a min(m, n)-by-n matrix. |
| p | Returns an m-by-m permutation matrix such that l*u = p*a. The LU-factorization of p'*a thus works without row interchanges. |
A = [-6, 17; 3, 8]
[L, U] = lu(A)
B = L*U