01 /*
02 * $Id: MatrixConjugateTransposeSample.java,v 1.7 2008/03/03 07:18:09 koga Exp $
03 *
04 * Copyright (C) 2004 Koga Laboratory. All rights reserved.
05 *
06 */
07 package matxbook.chap04;
08
09 import org.mklab.nfc.matrix.DoubleComplexMatrix;
10 import org.mklab.nfc.matrix.DoubleMatrix;
11 import org.mklab.nfc.matrix.Matrix;
12
13
14 /**
15 * 共役複素転置行列を求めるサンプルです。
16 *
17 * @author koga
18 * @version $Revision: 1.7 $, 2004/04/10
19 */
20 public class MatrixConjugateTransposeSample {
21
22 /**
23 * メインメソッド
24 *
25 * @param args コマンドライン引数
26 */
27 @SuppressWarnings("nls")
28 public static void main(String[] args) {
29 DoubleMatrix a = new DoubleMatrix(new double[][] { {1, 2, 3}, {4, 5, 6}, {7, 8, 0}});
30 DoubleMatrix b = new DoubleMatrix(new double[][] { {8, 1, 6}, {3, 5, 7}, {4, 9, 2}});
31 Matrix c = new DoubleComplexMatrix(a, b);
32 Matrix d = c.conjugateTranspose();
33 d.print("(a + b j)#");
34 }
35 }
|