I am new to using Jama for matrices. My problem is while I'm using det()
method (which is related with LUDecomposition
class) it gives "Matrix must be square"
. Ok my matrix is triangle but with LUDecomposition
it should give me square matrix. My code like this
public double findDeterminant(Matrix mtrx) {
LUDecomposition dec = new LUDecomposition(mtrx);
det = dec.det();
return det;
}