Java File Save saveDoubleMatrix(double[][] matrix, PrintStream out)

Here you can find the source of saveDoubleMatrix(double[][] matrix, PrintStream out)

Description

save Double Matrix

License

Open Source License

Declaration

public static void saveDoubleMatrix(double[][] matrix, PrintStream out) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.PrintStream;

public class Main {
    public static void saveDoubleMatrix(double[][] matrix, PrintStream out) {
        int rows = matrix.length;
        int cols = matrix[0].length;
        out.println(rows + " " + cols);
        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < cols; j++) {
                out.print(matrix[i][j]);
                if (j != cols - 1) {
                    out.print(" ");
                }//  w w  w.  j  a va2 s  . com
            }
            out.println();
        }
    }
}

Related

  1. save(InputStream is, OutputStream os)
  2. save(OutputStream out, InputStream iStream)
  3. saveBytesAsIfile(final IFile file, final byte[] bytes)
  4. saveContent(OutputStream os, byte[] content)
  5. saveConvert(String theString, boolean escapeSpace)
  6. saveFile(InputStream st, File testFile)
  7. saveFile(String fname, byte[] bytes)
  8. saveFile(String where)
  9. saveInputToOutput(InputStream is, OutputStream os)