source: pacpussensors/trunk/Vislab/lib3dv/eigen/Eigen-install/doc/snippets/compile_RealSchur_RealSchur_MatrixType.cpp@ 136

Last change on this file since 136 was 136, checked in by ldecherf, 7 years ago

Doc

File size: 602 bytes
Line 
1#include <Eigen/Dense>
2#include <iostream>
3
4using namespace Eigen;
5using namespace std;
6
7int main(int, char**)
8{
9 cout.precision(3);
10 MatrixXd A = MatrixXd::Random(6,6);
11cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
12
13RealSchur<MatrixXd> schur(A);
14cout << "The orthogonal matrix U is:" << endl << schur.matrixU() << endl;
15cout << "The quasi-triangular matrix T is:" << endl << schur.matrixT() << endl << endl;
16
17MatrixXd U = schur.matrixU();
18MatrixXd T = schur.matrixT();
19cout << "U * T * U^T = " << endl << U * T * U.transpose() << endl;
20
21 return 0;
22}
Note: See TracBrowser for help on using the repository browser.