01 /*
02 * $Id: MatFormatWrite.java,v 1.2 2008/02/02 03:06:30 koga Exp $
03 *
04 * Copyright (C) 2004 Koga Laboratory. All rights reserved.
05 *
06 */
07 package matxbook.chap14;
08
09 import java.io.IOException;
10
11 import org.mklab.nfc.matrix.DoubleMatrix;
12
13
14 /**
15 * MaTXのMAT形式としてデータを書き出すサンプルです。
16 * @author koga
17 * @version $Revision: 1.2 $, 2004/04/27
18 */
19 public class MatFormatWrite {
20
21 /**
22 * メインメソッド
23 *
24 * @param args コマンドライン引数
25 * @throws IOException ファイルに出力できない場合
26 */
27 @SuppressWarnings("nls")
28 public static void main(String[] args) throws IOException {
29 DoubleMatrix a = new DoubleMatrix(new double[][] { {1, 2}, {3, 4}});
30 a.writeMatFormat("a.mat");
31 }
32 }
|