source:
pacpussensors/trunk/Vislab/lib3dv/eigen/doc/snippets/Matrix_resize_int_int.cpp@
138
Last change on this file since 138 was 136, checked in by , 8 years ago | |
---|---|
File size: 407 bytes |
Rev | Line | |
---|---|---|
[136] | 1 | MatrixXd m(2,3); |
2 | m << 1,2,3,4,5,6; | |
3 | cout << "here's the 2x3 matrix m:" << endl << m << endl; | |
4 | cout << "let's resize m to 3x2. This is a conservative resizing because 2*3==3*2." << endl; | |
5 | m.resize(3,2); | |
6 | cout << "here's the 3x2 matrix m:" << endl << m << endl; | |
7 | cout << "now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:" << endl; | |
8 | m.resize(2,2); | |
9 | cout << m << endl; |
Note:
See TracBrowser
for help on using the repository browser.