00001 #include <unsupported/Eigen/MatrixFunctions> 00002 #include <iostream> 00003 00004 using namespace Eigen; 00005 00006 int main() 00007 { 00008 const double pi = std::acos(-1.0); 00009 Matrix3d A; 00010 A << cos(1), -sin(1), 0, 00011 sin(1), cos(1), 0, 00012 0 , 0 , 1; 00013 std::cout << "The matrix A is:\n" << A << "\n\n" 00014 "The matrix power A^(pi/4) is:\n" << A.pow(pi/4) << std::endl; 00015 return 0; 00016 }