#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
Go to the source code of this file.
|
template<typename MatrixType > |
void | continuousToDiscrete (MatrixType &Fd, MatrixType &Qd, const MatrixType &Fc, const MatrixType &Qc, double dt) |
|
template<typename MatrixType >
void continuousToDiscrete |
( |
MatrixType & |
Fd, |
|
|
MatrixType & |
Qd, |
|
|
const MatrixType & |
Fc, |
|
|
const MatrixType & |
Qc, |
|
|
double |
dt |
|
) |
| |
Definition at line 9 of file continuous_to_discrete.h.
14 NX = MatrixType::ColsAtCompileTime,
15 NY = MatrixType::RowsAtCompileTime,
16 NX2 = 2 * MatrixType::RowsAtCompileTime
19 typedef Eigen::Matrix<typename MatrixType::Scalar,NX2,NX2> DoubleSizedMatrixType;
20 DoubleSizedMatrixType bigA(NX2,NX2), bigB(NX2,NX2);
23 bigA.template topLeftCorner<NX,NX>()=-Fc*dt;
24 bigA.template topRightCorner<NX,NX>()= Qc * dt;
25 bigA.template bottomLeftCorner<NX,NX>().setZero();
26 bigA.template bottomRightCorner<NX,NX>()=Fc.transpose() * dt;
34 Fd = bigB.template bottomRightCorner<NX,NX>().transpose();
35 Qd = Fd * bigB.template topRightCorner<NX,NX>();