Vdpol.java
/*
* $Id: Vdpol.java,v 1.12 2008/06/26 10:10:34 koga Exp $
*
* Copyright (C) 2004 Koga Laboratory. All rights reserved.
*
*/
package org.mklab.tool.control.model.matxbook;
import org.mklab.nfc.matrix.DoubleMatrix;
import org.mklab.nfc.ode.DoubleExplicitDifferentialEquation;
/**
* ヴァンデルポール方程式を表すクラスです。
*
* @author koga
* @version $Revision: 1.12 $, 2004/04/22
*/
public class Vdpol implements DoubleExplicitDifferentialEquation {
/**
* {@inheritDoc}
*/
public DoubleMatrix differentialEquation(double t, DoubleMatrix X) {
double x1 = X.getDoubleElement(1);
double x2 = X.getDoubleElement(2);
DoubleMatrix dx = new DoubleMatrix(new double[][] { {x2}, {(1 - x1 * x1) * x2 - x1}});
return dx;
}
}