aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/HessenbergDecomposition_matrixH.cpp
blob: af01366683fdc3534efcf23a9ffa3bc34f9bf41b (plain)
1
2
3
4
5
6
7
8
Matrix4f A = MatrixXf::Random(4,4);
cout << "Here is a random 4x4 matrix:" << endl << A << endl;
HessenbergDecomposition<MatrixXf> hessOfA(A);
MatrixXf H = hessOfA.matrixH();
cout << "The Hessenberg matrix H is:" << endl << H << endl;
MatrixXf Q = hessOfA.matrixQ();
cout << "The orthogonal matrix Q is:" << endl << Q << endl;
cout << "Q H Q^T is:" << endl << Q * H * Q.transpose() << endl;