lu - LU factors of Gaussian elimination
produces two matrices L and U such that A = L*U with U upper triangular and E*L lower triangular for a permutation matrix E.
If A has rank k, rows k+1 to n of U are zero.
produces three matrices L, U and E such that E*A = L*U with U upper triangular and E*L lower triangular for a permutation matrix E.
a=rand(4,4); [l,u]=lu(a) norm(l*u-a) [h,rk]=lufact(sparse(a)) // lufact fonctionne avec des matrices creuses [P,L,U,Q]=luget(h); ludel(h) P=full(P);L=full(L);U=full(U);Q=full(Q); norm(P*L*U*Q-a) // P,Q sont des matrices de permutation
lu decompositions are based on the Lapack routines DGETRF for real matrices and ZGETRF for the complex case.