You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
430 B

  1. MatrixXd A = MatrixXd::Random(6,6);
  2. cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
  3. EigenSolver<MatrixXd> es(A);
  4. MatrixXd D = es.pseudoEigenvalueMatrix();
  5. MatrixXd V = es.pseudoEigenvectors();
  6. cout << "The pseudo-eigenvalue matrix D is:" << endl << D << endl;
  7. cout << "The pseudo-eigenvector matrix V is:" << endl << V << endl;
  8. cout << "Finally, V * D * V^(-1) = " << endl << V * D * V.inverse() << endl;