public static String doubleMatrixToString(double[][] matrix){
  StringBuilder strBuilder=new StringBuilder("");
  for (int i=0; i < matrix.length; i++) {
    for (int j=0; j < matrix[i].length; j++) {
      strBuilder.append(Utils.round(matrix[i][j],2) + " ");
    }
    strBuilder.append("\n");
  }
  return strBuilder.toString();
}

public static String doubleMatrixToString ( double [ ] [ ] matrix ) { StringBuilder strBuilder = new StringBuilder ( "" ) ; for ( int i = 0 ; i < matrix . length ; i ++ ) { for ( int j = 0 ; j < matrix [ i ] . length ; j ++ ) { strBuilder . append ( Utils . round ( matrix [ i ] [ j ] , 2 ) + " " ) ; } strBuilder . append ( "\n" ) ; } return strBuilder . toString ( ) ; }
convert a 2 - d array of doubles to a string .
