DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


LUdecomposition

Declaration: TMatrix.LUdecomposition (var MatL, MatU: TMatrix): boolean;
The method LUDecomposition decomposes the matrix into two triangular matrices MatL and MatU, with the matrix MatL being the lower triangular matrix (containing all 1s in the diagonal), and matrix MatU being the upper triangular matrix. The figure below shows the LU decomposition of a matrix of order 5.

The function returns TRUE if the LU decomposition has been calculated successfully. Note that the product of the diagonal elements of matrix MatU is equal to the determinant of the matrix.