LP-311 Remove basic/advanced stabilization tab auto-switch (autotune/txpid lock issues)
[librepilot.git] / ground / gcs / src / libs / eigen / doc / snippets / Tutorial_AdvancedInitialization_ThreeWays.cpp
blobcb7457652d00976eeb6d12cdddde4207f16db03c
1 const int size = 6;
2 MatrixXd mat1(size, size);
3 mat1.topLeftCorner(size/2, size/2) = MatrixXd::Zero(size/2, size/2);
4 mat1.topRightCorner(size/2, size/2) = MatrixXd::Identity(size/2, size/2);
5 mat1.bottomLeftCorner(size/2, size/2) = MatrixXd::Identity(size/2, size/2);
6 mat1.bottomRightCorner(size/2, size/2) = MatrixXd::Zero(size/2, size/2);
7 std::cout << mat1 << std::endl << std::endl;
9 MatrixXd mat2(size, size);
10 mat2.topLeftCorner(size/2, size/2).setZero();
11 mat2.topRightCorner(size/2, size/2).setIdentity();
12 mat2.bottomLeftCorner(size/2, size/2).setIdentity();
13 mat2.bottomRightCorner(size/2, size/2).setZero();
14 std::cout << mat2 << std::endl << std::endl;
16 MatrixXd mat3(size, size);
17 mat3 << MatrixXd::Zero(size/2, size/2), MatrixXd::Identity(size/2, size/2),
18 MatrixXd::Identity(size/2, size/2), MatrixXd::Zero(size/2, size/2);
19 std::cout << mat3 << std::endl;