title: How to print a RealMatrix with table formating
body: <p>I'm using apache-commons-math RealMatrix on my project to handle matrix operations, however I can't print it with proper formatting.</p>
  <p>For every matrix i have so far it goes like this:</p>
  <pre><code>double coord[][] = new double[3][3];
                      
          coord[0][0] = 1d;    
          coord[0][1] = 0d;    
          coord[0][2] = 0d;    
  
          coord[1][0] = 2d;    
          coord[1][1] = 1d;    
          coord[1][2] = 1d;    
  
          coord[2][0] = 3d;    
          coord[2][1] = 2d;    
          coord[2][2] = 0d;    
      
          
      System.out.println(&quot;coordinates  [nó, x, y]&quot;);
          for(int co = 0 ; co &lt; 3 ; co++){
              for(int or = 0 ; or &lt; 3 ; or++){
                  System.out.printf(&quot;%10.5f\t&quot;,coord[co][or]);
              }
              System.out.print(&quot;\n&quot;);
          }
  </code></pre>
  <p>outputing:</p>
  <pre><code>    coordinates  [nó, x, y]
     1,00000     0,00000     0,00000  
     2,00000     1,00000     1,00000  
     3,00000     2,00000     0,00000
  </code></pre>
  <p>But when i'm using RealMatrix to print, it only prints in string (as far as i could find by myself) like this:</p>
  <pre><code>double coord[][] = new double[3][3];
                              
              coord[0][0] = 1d;    
              coord[0][1] = 0d;    
              coord[0][2] = 0d;    
  
              coord[1][0] = 2d;    
              coord[1][1] = 1d;    
              coord[1][2] = 1d;    
  
              coord[2][0] = 3d;    
              coord[2][1] = 2d;    
              coord[2][2] = 0d;   
          
          
          RealMatrix m = MatrixUtils.createRealMatrix(coord);                  
          System.out.println(m.toString());
          
  </code></pre>
  <p>outputing:</p>
  <pre><code>Array2DRowRealMatrix{{1.0,0.0,0.0},{2.0,1.0,1.0},{3.0,2.0,0.0}}
  </code></pre>
  <p>How can I get the same output as in the first case using RealMatrix? From the error messages I get when I try to do it by myself, it seems that if I can convert the realmatrix back to an array it would solve my problem, but I cant manage to do that either...</p>
  <p>Edit 1: As I'm trying to solve this, I found that getting the results of my matrix operations in an array would be very helpful, or at least a way of reading specific values out of them.</p>
  <p>Edit 2: Added Java tag</p>