RationalPolynomialMatrixDerivativeIntegral.java
01 /*
02  * $Id: RationalPolynomialMatrixDerivativeIntegral.java,v 1.6 2008/01/14 09:06:53 koga Exp $
03  *
04  * Copyright (C) 2004 Koga Laboratory. All rights reserved.
05  *
06  */
07 package matxbook.chap17;
08 
09 import org.mklab.nfc.matrix.Matrix;
10 import org.mklab.nfc.matrix.RationalPolynomialMatrix;
11 import org.mklab.nfc.scalar.Polynomial;
12 import org.mklab.nfc.scalar.RationalPolynomial;
13 
14 
15 /**
16  * 有理多項式行列の導関数と不定積分のサンプルです。
17  @author koga
18  @version $Revision: 1.6 $, 2004/04/19
19  */
20 public class RationalPolynomialMatrixDerivativeIntegral {
21 
22   /**
23    * メインメソッド
24    
25    @param args コマンドライン引数
26    */
27   @SuppressWarnings("nls")
28   public static void main(String[] args) {
29     Polynomial s = new Polynomial("s");
30     RationalPolynomialMatrix a = new RationalPolynomialMatrix(new RationalPolynomial[] {s.inverse()new RationalPolynomial(2, s.multiply(2).add(1))});
31     Matrix a1 = a.derivative();
32     Matrix a2 = a.derivative(2);
33     a1.print("a1");
34     a2.print("a2");
35   }
36 }