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
ArrayXcf v
Definition: Cwise_arg.cpp:1
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
int main()


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:19