0

Im trying to print a big double matrix (250x250) to the console in eclipse. The code works for smaller matrices but with 250x250 it only prints the last 50 lines or so. What am I doing wrong ? There are some Infinity Elements which get converted to the string "Inf" but in my testing this hasnt any impact on the output.

for (int x = 0; x < matrix.length; x++) {
    for (int y = 0; y < matrix.length; y++) { 
        if (matrix[x][y] == Double.POSITIVE_INFINITY) {
            System.out.print("   " + "Inf" + "  ");
        } else {
            System.out.print("   " + matrix[x][y] + "  ");
        }
    }
System.out.println();
}
LBats
  • 1
  • 1
  • The console's output size is limited by default; does [this answer](https://stackoverflow.com/a/2828293/10226142) fix the issue? – Emmanuel Chebbi May 26 '20 at 09:24
  • Thank you, that was indeed the porblem – LBats May 26 '20 at 11:37
  • 1
    Does this answer your question? [How do I increase the capacity of the Eclipse output console?](https://stackoverflow.com/questions/2828255/how-do-i-increase-the-capacity-of-the-eclipse-output-console) – Emmanuel Chebbi May 26 '20 at 11:38

0 Answers0