Line | |
---|
1 | #include <Eigen/Dense>
|
---|
2 | #include <iostream>
|
---|
3 |
|
---|
4 | using namespace Eigen;
|
---|
5 | using namespace std;
|
---|
6 |
|
---|
7 | int main(int, char**)
|
---|
8 | {
|
---|
9 | cout.precision(3);
|
---|
10 | MatrixXd A = MatrixXd::Random(6,6);
|
---|
11 | cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
|
---|
12 |
|
---|
13 | RealSchur<MatrixXd> schur(A);
|
---|
14 | cout << "The orthogonal matrix U is:" << endl << schur.matrixU() << endl;
|
---|
15 | cout << "The quasi-triangular matrix T is:" << endl << schur.matrixT() << endl << endl;
|
---|
16 |
|
---|
17 | MatrixXd U = schur.matrixU();
|
---|
18 | MatrixXd T = schur.matrixT();
|
---|
19 | cout << "U * T * U^T = " << endl << U * T * U.transpose() << endl;
|
---|
20 |
|
---|
21 | return 0;
|
---|
22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.