Java Matrix Print printMatrix(double[][] matrix)

Here you can find the source of printMatrix(double[][] matrix)

Description

print the specifield matrix

License

Apache License

Parameter

Parameter Description

Declaration

public static void printMatrix(double[][] matrix) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*from  w  ww .j a v  a 2s .c om*/
     * print the specifield matrix
     * 
     * @param    double[][]
    */
    public static void printMatrix(double[][] matrix) {
        StringBuffer sb = new StringBuffer();
        sb.append('[').append('\n');
        for (double[] line : matrix) {
            for (double column : line) {
                sb.append(column).append(", ");
            }
            sb.append('\n');
        }
        sb.append(']');
        System.out.println(sb.toString());
    }
}

Related

  1. printMatrix(byte[][] matrix, boolean printMatrix)
  2. printMatrix(double data[][])
  3. printMatrix(double[] a, String label)
  4. printMatrix(double[][] matrix)
  5. printMatrix(double[][] matrix)
  6. printMatrix(double[][] matrix)
  7. printMatrix(double[][] matrix)
  8. printMatrix(double[][] sims)
  9. printMatrix(final double m[][])