Tutorial_BlockOperations_print_block.cpp
Go to the documentation of this file.
00001 #include <Eigen/Dense>
00002 #include <iostream>
00003 
00004 using namespace std;
00005 
00006 int main()
00007 {
00008   Eigen::MatrixXf m(4,4);
00009   m <<  1, 2, 3, 4,
00010         5, 6, 7, 8,
00011         9,10,11,12,
00012        13,14,15,16;
00013   cout << "Block in the middle" << endl;
00014   cout << m.block<2,2>(1,1) << endl << endl;
00015   for (int i = 1; i <= 3; ++i)
00016   {
00017     cout << "Block of size " << i << "x" << i << endl;
00018     cout << m.block(0,0,i,i) << endl << endl;
00019   }
00020 }


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