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.

16 lines
374 B

  1. #include <unsupported/StormEigen/MatrixFunctions>
  2. #include <iostream>
  3. using namespace StormEigen;
  4. int main()
  5. {
  6. const double pi = std::acos(-1.0);
  7. Matrix3d A;
  8. A << cos(1), -sin(1), 0,
  9. sin(1), cos(1), 0,
  10. 0 , 0 , 1;
  11. std::cout << "The matrix A is:\n" << A << "\n\n"
  12. "The matrix power A^(pi/4) is:\n" << A.pow(pi/4) << std::endl;
  13. return 0;
  14. }