import com.imsl.math.*; public class LUEx1 { public static void main(String args[]) throws SingularMatrixException { double a[][] = { {1, 3, 3}, {1, 3, 4}, {1, 4, 3} }; double b[] = {12, 13, 14}; // Compute the LU factorization of A LU lu = new LU(a); // Solve Ax = b double x[] = lu.solve(b); new PrintMatrix("x").print(x); // Find the inverse of A. double ainv[][] = lu.inverse(); new PrintMatrix("ainv").print(ainv); // Find the condition number of A. double condition = lu.condition(a); System.out.println("condition number = "+condition); System.out.println(); // Find the determinant of A. double determinant = lu.determinant(); System.out.println("determinant = "+determinant); } }