From 44861dcbfeee041223c4aac1ee075e92fa4daa01 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 18 Sep 2016 12:42:15 +0200 Subject: update --- eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp (limited to 'eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp') diff --git a/eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp b/eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp new file mode 100644 index 0000000..af01366 --- /dev/null +++ b/eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp @@ -0,0 +1,8 @@ +Matrix4f A = MatrixXf::Random(4,4); +cout << "Here is a random 4x4 matrix:" << endl << A << endl; +HessenbergDecomposition 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; -- cgit v1.2.3