2010-06-17 12:12:40 +01:00
|
|
|
#include <iostream>
|
|
|
|
|
#include <Eigen/Dense>
|
|
|
|
|
|
2021-12-07 19:57:38 +00:00
|
|
|
using Eigen::MatrixXd;
|
|
|
|
|
using Eigen::VectorXd;
|
2010-06-17 12:12:40 +01:00
|
|
|
|
2010-06-25 10:04:10 -04:00
|
|
|
int main() {
|
2012-08-17 14:49:18 +01:00
|
|
|
MatrixXd m = MatrixXd::Random(3, 3);
|
|
|
|
|
m = (m + MatrixXd::Constant(3, 3, 1.2)) * 50;
|
2021-12-07 19:57:38 +00:00
|
|
|
std::cout << "m =" << std::endl << m << std::endl;
|
2012-08-17 14:49:18 +01:00
|
|
|
VectorXd v(3);
|
2010-06-27 19:37:16 +02:00
|
|
|
v << 1, 2, 3;
|
2021-12-07 19:57:38 +00:00
|
|
|
std::cout << "m * v =" << std::endl << m * v << std::endl;
|
2010-06-17 12:12:40 +01:00
|
|
|
}
|