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.

17 lines
424 B

  1. #include <unsupported/Eigen/MatrixFunctions>
  2. #include <iostream>
  3. using namespace Eigen;
  4. int main()
  5. {
  6. Matrix4cd A = Matrix4cd::Random();
  7. MatrixPower<Matrix4cd> Apow(A);
  8. std::cout << "The matrix A is:\n" << A << "\n\n"
  9. "A^3.1 is:\n" << Apow(3.1) << "\n\n"
  10. "A^3.3 is:\n" << Apow(3.3) << "\n\n"
  11. "A^3.7 is:\n" << Apow(3.7) << "\n\n"
  12. "A^3.9 is:\n" << Apow(3.9) << std::endl;
  13. return 0;
  14. }