1MatrixXd A = MatrixXd::Random(6,6);
2cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
3
4RealSchur<MatrixXd> schur(A);
5cout << "The orthogonal matrix U is:" << endl << schur.matrixU() << endl;
6cout << "The quasi-triangular matrix T is:" << endl << schur.matrixT() << endl << endl;
7
8MatrixXd U = schur.matrixU();
9MatrixXd T = schur.matrixT();
10cout << "U * T * U^T = " << endl << U * T * U.transpose() << endl;
11