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

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

Description

Prints the matrix to STDOUT

License

Apache License

Parameter

Parameter Description
matrix the matrix

Declaration

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

Method Source Code

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

public class Main {
    /**// www. j ava 2 s .co m
     * Prints the matrix to STDOUT
     * @param matrix the matrix
     */
    public static void printMatrix(double[][] matrix) {
        for (int i = 0; i < matrix.length; i++) {
            for (int j = 0; j < matrix[i].length; j++) {
                System.out.printf("%5.2f\t", matrix[i][j]);
            }
            System.out.println();
        }
    }
}

Related

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