ait-survey

Eigen_introduction

Jan 4th, 2015
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. /*********
  2. Referenced
  3. http://eigen.tuxfamily.org/dox/GettingStarted.html
  4. *********/
  5.  
  6. #include <iostream>
  7. #include <eigen3/Eigen/Dense>
  8. using Eigen::MatrixXd;
  9. int main()
  10. {
  11.   MatrixXd m(2,2);
  12.   m(0,0) = 3;
  13.   m(1,0) = 2.5;
  14.   m(0,1) = -1;
  15.   m(1,1) = m(1,0) + m(0,1);
  16.   std::cout << m << std::endl;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment