Java Matrix Print printMatrix(int M, int N, double mat[][])

Here you can find the source of printMatrix(int M, int N, double mat[][])

Description

print Matrix

License

Open Source License

Declaration

public static void printMatrix(int M, int N, double mat[][]) 

Method Source Code

//package com.java2s;
/*// w w  w .  j  av  a  2s .  c om
 * #%L
 * Cyni Implementation (cyni-impl)
 * $Id:$
 * $HeadURL:$
 * %%
 * Copyright (C) 2006 - 2013 The Cytoscape Consortium
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 2.1 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public 
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/lgpl-2.1.html>.
 * #L%
 */

public class Main {
    public static void printMatrix(int M, int N, double mat[][]) {
        for (int i = 0; i < M; i++) {
            for (int j = 0; j < N; j++)
                System.out.print(mat[i][j] + " ");

            System.out.println();
        }

    }
}

Related

  1. printMatrix(double[][] matrix)
  2. printMatrix(double[][] matrix)
  3. printMatrix(double[][] sims)
  4. printMatrix(final double m[][])
  5. printMatrix(float[] array, int rows, int columns)
  6. printMatrix(int m, int n, double[][] a)
  7. printMatrix(int matrix[][])
  8. printMatrix(int[] array, String format, int width)
  9. printMatrix(int[][] M)