Here you can find the source of matrixToString(float[][][] matrix)
Parameter | Description |
---|---|
matrix | a parameter |
public static String matrixToString(float[][][] matrix)
//package com.java2s; //License from project: CeCILL license public class Main { public static final String SEPARATOR = " "; /**//from www . ja v a 2 s.c om * Write the full matrix to a string * * @param matrix * @return a string with the matrix (space separated values) */ public static String matrixToString(float[][][] matrix) { StringBuffer out = new StringBuffer(); for (int k = 0; k < matrix[0][0].length; k++) { for (int i = matrix.length - 1; i >= 0; i--) { for (int j = 0; j < matrix[0].length; j++) { out.append(matrix[i][j][k]); // change here for format (presently space separated values out.append(SEPARATOR); } out.append("\n"); } out.append("\n"); } return out.toString(); } }