source: pacpussensors/trunk/Vislab/lib3dv/eigen/doc/snippets/Matrix_resize_int_int.cpp@ 136

Last change on this file since 136 was 136, checked in by ldecherf, 7 years ago

Doc

File size: 407 bytes
Line 
1MatrixXd m(2,3);
2m << 1,2,3,4,5,6;
3cout << "here's the 2x3 matrix m:" << endl << m << endl;
4cout << "let's resize m to 3x2. This is a conservative resizing because 2*3==3*2." << endl;
5m.resize(3,2);
6cout << "here's the 3x2 matrix m:" << endl << m << endl;
7cout << "now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:" << endl;
8m.resize(2,2);
9cout << m << endl;
Note: See TracBrowser for help on using the repository browser.