MatrixSinh.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   MatrixXf A = MatrixXf::Random(3,3);
00009   std::cout << "A = \n" << A << "\n\n";
00010 
00011   MatrixXf sinhA = A.sinh();
00012   std::cout << "sinh(A) = \n" << sinhA << "\n\n";
00013 
00014   MatrixXf coshA = A.cosh();
00015   std::cout << "cosh(A) = \n" << coshA << "\n\n";
00016   
00017   // The matrix functions satisfy cosh^2(A) - sinh^2(A) = I, 
00018   // like the scalar functions.
00019   std::cout << "cosh^2(A) - sinh^2(A) = \n" << coshA*coshA - sinhA*sinhA << "\n\n";
00020 }


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:33:07