-1

I have a 99 X 99 Matrix object that I populated from a 99X99 array of doubles. When I use the print method on the object I get several rows and columns of the ? character throughout the output. The program doesn't throw any exceptions.

double myArray[][] = new myArray[99][99];
// Init the matrix...
Jama.Matrix foo = new Jama.Matrix(myArray);
foo.print(8,6)

Here is row 7, all 99 columns:

0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000
0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  
0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  
0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  
0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  
0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  
0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  
0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  
0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  
0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  0.000000  
0.000000  0.000000  0.000000         ?         ?         ?         
?         ?         ?         ?         ?         ?         ?         
?         ?         ?         ?         ?         ?         ?         
?         ?         ?         ?         ?         ?         ?         
?         ?
Tunaki
  • 132,869
  • 46
  • 340
  • 423
nicomp
  • 4,344
  • 4
  • 27
  • 60
  • 1
    I ran your code (with a couple changes to make it compile: changed your array declaration to `new double[99][99]` and ended `foo.print(8, 6)` with a semicolon), and it runs fine for me. All 0s, no `?`. – azurefrog Apr 14 '16 at 22:00
  • 2
    I think this is an issue with your IDE output. It must be truncating or messing with it. Test with a lower window like `new double[10][10];`. – Tunaki Apr 14 '16 at 22:01
  • 1
    That's the same version I grabbed. I'm agreeing with @Tunaki that this is an output issue, not a jama issue. – azurefrog Apr 14 '16 at 22:07
  • I think you're right. Thanks. – nicomp Apr 14 '16 at 22:17

1 Answers1

0

Answer: The matrix contained NaN in many of the cells. Those 'values' were printing as the ? character.

nicomp
  • 4,344
  • 4
  • 27
  • 60