Here you can find the source of LoadMatFromFile(double[] mat, String filename)
public static void LoadMatFromFile(double[] mat, String filename)
//package com.java2s; //License from project: Open Source License import java.io.IOException; public class Main { public static void LoadMatFromFile(double[] mat, String filename) { try {//w w w . j av a 2 s .c o m java.io.FileInputStream fis = new java.io.FileInputStream(filename); java.io.ObjectInputStream inStream = new java.io.ObjectInputStream(fis); for (int i = 0; i < mat.length; i++) mat[i] = inStream.readDouble(); inStream.close(); inStream.close(); } catch (IOException e) { System.out.println("SaveMatToFile: Caught IOException when trying to write to file: " + e.getMessage()); System.exit(-1); } } }