code: public static void print( PrintStream out , DMatrixSparseCSC m , String format ) {
          if( format.toLowerCase().equals("matlab")) {
              printMatlab(out,m);
          } else {
              printTypeSize(out, m);
  
              int length = String.format(format, -1.1123).length();
              char[] zero = new char[length];
              Arrays.fill(zero, ' ');
              zero[length / 2] = '*';
  
              for (int row = 0; row < m.numRows; row++) {
                  for (int col = 0; col < m.numCols; col++) {
                      int index = m.nz_index(row, col);
                      if (index >= 0)
                          out.printf(format, m.nz_values[index]);
                      else
                          out.print(zero);
                      if (col != m.numCols - 1)
                          out.print(" ");
                  }
                  out.println();
              }
          }
      }
docs: Prints the matrix out in a text format. The format is specified using notation from
  {@link String#format(String, Object...)}. Unless the format is set to 'matlab' then it will print it out
  in a format that's understood by Matlab.
  @param out Output stream
  @param m Matrix to be printed
  @param format printf style or 'matlab'