aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/RealSchur_RealSchur_MatrixType.cpp
blob: a5530dcc8f786835a8a7d8beb9fe5e16bfa7fa6b (plain)
1
2
3
4
5
6
7
8
9
10
MatrixXd A = MatrixXd::Random(6,6);
cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;

RealSchur<MatrixXd> schur(A);
cout << "The orthogonal matrix U is:" << endl << schur.matrixU() << endl;
cout << "The quasi-triangular matrix T is:" << endl << schur.matrixT() << endl << endl;

MatrixXd U = schur.matrixU();
MatrixXd T = schur.matrixT();
cout << "U * T * U^T = " << endl << U * T * U.transpose() << endl;