Vectorwise_reverse.cpp
Go to the documentation of this file.
00001 MatrixXi m = MatrixXi::Random(3,4);
00002 cout << "Here is the matrix m:" << endl << m << endl;
00003 cout << "Here is the rowwise reverse of m:" << endl << m.rowwise().reverse() << endl;
00004 cout << "Here is the colwise reverse of m:" << endl << m.colwise().reverse() << endl;
00005 
00006 cout << "Here is the coefficient (1,0) in the rowise reverse of m:" << endl
00007 << m.rowwise().reverse()(1,0) << endl;
00008 cout << "Let us overwrite this coefficient with the value 4." << endl;
00009 //m.colwise().reverse()(1,0) = 4;
00010 cout << "Now the matrix m is:" << endl << m << endl;


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