DenseBase_middleCols_int.cpp 282 B

123456789101112131415
  1. #include <Eigen/Core>
  2. #include <iostream>
  3. using namespace Eigen;
  4. using namespace std;
  5. int main(void)
  6. {
  7. int const N = 5;
  8. MatrixXi A(N,N);
  9. A.setRandom();
  10. cout << "A =\n" << A << '\n' << endl;
  11. cout << "A(1..3,:) =\n" << A.middleCols(1,3) << endl;
  12. return 0;
  13. }