QuickStart_example2_dynamic.cpp
Go to the documentation of this file.
1 #include <iostream>
2 #include <Eigen/Dense>
3 
4 using Eigen::MatrixXd;
5 using Eigen::VectorXd;
6 
7 int main()
8 {
9  MatrixXd m = MatrixXd::Random(3,3);
10  m = (m + MatrixXd::Constant(3,3,1.2)) * 50;
11  std::cout << "m =" << std::endl << m << std::endl;
12  VectorXd v(3);
13  v << 1, 2, 3;
14  std::cout << "m * v =" << std::endl << m * v << std::endl;
15 }
Matrix3f m
Array< int, Dynamic, 1 > v
Matrix< double, Dynamic, 1 > VectorXd
DynamicĂ—1 vector of type double.
Definition: Matrix.h:502
Matrix< double, Dynamic, Dynamic > MatrixXd
DynamicĂ—Dynamic matrix of type double.
Definition: Matrix.h:502