mc.setMeanMatrix(mm);
//calculate jpd
temp = new Matrix(ghkPot.getGhkPot().getK().getkMatrix());
temp2 = new Matrix(mm.getMeanMatrix());
double logValue = temp.det() > 0 ? Math.log(temp.det()):temp.det();
double t1 = ghkPot.getGhkPot().getG();
double t2 = - 0.5*(logValue - ghkPot.getContinuousNodeList().size()*Math.log(2*Math.PI) - temp2.transpose().times(temp).times(temp2).det());
System.out.println("t1 is "+t1);
System.out.println("t2 is "+t2);
double t = Math.exp(t1 + t2);