tut_matrix_resize.cpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <Eigen/Dense>
00003 
00004 using namespace Eigen;
00005 
00006 int main()
00007 {
00008   MatrixXd m(2,5);
00009   m.resize(4,3);
00010   std::cout << "The matrix m is of size "
00011             << m.rows() << "x" << m.cols() << std::endl;
00012   std::cout << "It has " << m.size() << " coefficients" << std::endl;
00013   VectorXd v(2);
00014   v.resize(5);
00015   std::cout << "The vector v is of size " << v.size() << std::endl;
00016   std::cout << "As a matrix, v is of size "
00017             << v.rows() << "x" << v.cols() << std::endl;
00018 }


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:33:55