tut_matrix_resize.cpp
Go to the documentation of this file.
1 #include <iostream>
2 #include <Eigen/Dense>
3 
4 using namespace Eigen;
5 
6 int 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 }
Matrix3f m
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
int main()
Array< int, Dynamic, 1 > v


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:38