You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
305 B

  1. #include <iostream>
  2. #include <Eigen/Dense>
  3. using namespace Eigen;
  4. using namespace std;
  5. int main()
  6. {
  7. MatrixXd m = MatrixXd::Random(3,3);
  8. m = (m + MatrixXd::Constant(3,3,1.2)) * 50;
  9. cout << "m =" << endl << m << endl;
  10. VectorXd v(3);
  11. v << 1, 2, 3;
  12. cout << "m * v =" << endl << m * v << endl;
  13. }