HessenbergDecomposition_matrixH.cpp revision c981c48f5bc9aefeffc0bcb0cc3934c2fae179dd
1Matrix4f A = MatrixXf::Random(4,4);
2cout << "Here is a random 4x4 matrix:" << endl << A << endl;
3HessenbergDecomposition<MatrixXf> hessOfA(A);
4MatrixXf H = hessOfA.matrixH();
5cout << "The Hessenberg matrix H is:" << endl << H << endl;
6MatrixXf Q = hessOfA.matrixQ();
7cout << "The orthogonal matrix Q is:" << endl << Q << endl;
8cout << "Q H Q^T is:" << endl << Q * H * Q.transpose() << endl;
9