MatrixSquareRoot.cpp
Go to the documentation of this file.
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 
00010   MatrixXd A(2,2);
00011   A << cos(pi/3), -sin(pi/3), 
00012        sin(pi/3),  cos(pi/3);
00013   std::cout << "The matrix A is:\n" << A << "\n\n";
00014   std::cout << "The matrix square root of A is:\n" << A.sqrt() << "\n\n";
00015   std::cout << "The square of the last matrix is:\n" << A.sqrt() * A.sqrt() << "\n";
00016 }


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:33:13