1#include <iostream> 2#include <Eigen/Dense> 3 4using namespace Eigen; 5 6int main() 7{ 8 MatrixXd m(2,5); 9 m.resize(4,3); 10 std::cout << "The matrix m is of size " 11 << m.rows() << "x" << m.cols() << std::endl; 12 std::cout << "It has " << m.size() << " coefficients" << std::endl; 13 VectorXd v(2); 14 v.resize(5); 15 std::cout << "The vector v is of size " << v.size() << std::endl; 16 std::cout << "As a matrix, v is of size " 17 << v.rows() << "x" << v.cols() << std::endl; 18} 19