Exemplo n.º 1
0
 public void testJacobian() throws Exception {
   OdeSystem sys = new SimpleTest();
   // (4,0) punto silla
   Matrix jac = sys.getJacobianMatrix(new double[] {4, 0});
   EigenvalueDecomposition eig = jac.eig();
   double[] imag = eig.getImagEigenvalues();
   double[] real = eig.getRealEigenvalues();
   print(real, imag);
   // TODO que devuelva numérico!
   assertEquals("hyperbolic unstable saddle point ", Stability.getPointType(real, imag));
   System.out.println(Stability.getPointType(real, imag));
 }
Exemplo n.º 2
0
  protected void sim() {
    sys = new Chua();
    sys.setParameter("a", 15.8);
    //		sys.setParameter("b", 0.15);
    dyn = new OdeSimulator(sys);
    dyn.setSkip(2000);
    dyn.setItersMax(15000);
    try {
      dyn.compute();
    } catch (DynSimException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    data = dyn.getStateSeries();

    graph.addData(data, new MultirampColors());

    //		graph.setTickStep(2, 2);
    GrapherConfig conf = graph.getGrapherConfig();

    conf.unsetDrawConfig(GrapherConfig2D.DRAW_AXES_TEXT);
    conf.setDrawConfig(GrapherConfig2D.DRAW_GRID);
  }