1*bf2c3715SXin Li MatrixXf M1 = MatrixXf::Random(3,8); 2*bf2c3715SXin Li cout << "Column major input:" << endl << M1 << "\n"; 3*bf2c3715SXin Li Map<MatrixXf,0,OuterStride<> > M2(M1.data(), M1.rows(), (M1.cols()+2)/3, OuterStride<>(M1.outerStride()*3)); 4*bf2c3715SXin Li cout << "1 column over 3:" << endl << M2 << "\n"; 5*bf2c3715SXin Li 6*bf2c3715SXin Li typedef Matrix<float,Dynamic,Dynamic,RowMajor> RowMajorMatrixXf; 7*bf2c3715SXin Li RowMajorMatrixXf M3(M1); 8*bf2c3715SXin Li cout << "Row major input:" << endl << M3 << "\n"; 9*bf2c3715SXin Li Map<RowMajorMatrixXf,0,Stride<Dynamic,3> > M4(M3.data(), M3.rows(), (M3.cols()+2)/3, 10*bf2c3715SXin Li Stride<Dynamic,3>(M3.outerStride(),3)); 11*bf2c3715SXin Li cout << "1 column over 3:" << endl << M4 << "\n"; 12