Plot2dSample.java
01 /*
02  * $Id: Plot2dSample.java,v 1.7 2008/02/02 03:06:29 koga Exp $
03  *
04  * Copyright (C) 2004 Koga Laboratory. All rights reserved.
05  *
06  */
07 package matxbook.chap12old;
08 
09 import org.mklab.nfc.matrix.DoubleMatrix;
10 import org.mklab.tool.graph.mgplot.Mgplot;
11 
12 
13 /**
14  @author koga
15  @version $Revision: 1.7 $, 2004/05/01
16  */
17 public class Plot2dSample {
18 
19   /**
20    * メインメソッド
21    
22    @param args コマンドライン引数
23    @throws InterruptedException 強制終了された場合
24    */
25   public static void main(String[] argsthrows InterruptedException {
26     DoubleMatrix t = DoubleMatrix.series(0* Math.PI, 0.05);
27     DoubleMatrix s = t.sinElementWise();
28     Mgplot.plot(1, t, s);
29     Thread.sleep(3000);
30     Mgplot.plot(1, t, s, new String[] {"sin(t)"})//$NON-NLS-1$
31     Thread.sleep(3000);
32     Mgplot.key(1false);
33     Thread.sleep(3000);
34     Mgplot.quit();
35   }
36 }