This example shows how to define your own system.
- Note
- This generates a "System", not a "ControlledSystem". If you wanted to use this system for controller design, you should derive from "ControlledSystem"
#pragma once
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Masspoint(
double mass,
double d) : mass_(mass), d_(d) {}
{
}
{
derivative(0) = x(1);
derivative(1) = -d_ / mass_ * x(1);
}
private:
double mass_;
double d_;
};