MatrixLogarithm.cpp File Reference
#include <unsupported/Eigen/MatrixFunctions>
#include <iostream>

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )
6  {
7  using std::sqrt;
8  MatrixXd A(3, 3);
9  A << 0.5 * sqrt(2), -0.5 * sqrt(2), 0, 0.5 * sqrt(2), 0.5 * sqrt(2), 0, 0, 0, 1;
10  std::cout << "The matrix A is:\n" << A << "\n\n";
11  std::cout << "The matrix logarithm of A is:\n" << A.log() << "\n";
12 }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186

References sqrt().