Matrix_resize_int_int.cpp
Go to the documentation of this file.
00001 MatrixXd m(2,3);
00002 m << 1,2,3,4,5,6;
00003 cout << "here's the 2x3 matrix m:" << endl << m << endl;
00004 cout << "let's resize m to 3x2. This is a conservative resizing because 2*3==3*2." << endl;
00005 m.resize(3,2);
00006 cout << "here's the 3x2 matrix m:" << endl << m << endl;
00007 cout << "now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:" << endl;
00008 m.resize(2,2);
00009 cout << m << endl;


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:31:54