Registered Member
|
Hello,
I have been googling for a while now, but cant find the answer to this simple question. In matlab i can do this: rows = [1 3 5 9]; A = rand(10); B = A(rows, : ); How do i do this in eigen? It does not seem like it is possible? The closest thing i have found is MatrixXd a(10,10); a.row(1); ,but I want to get multiple rows/cols Thanks. |
Moderator
|
either do a for loop, or use the devel branch:
where rows can be {1,3,5,9}, a std::vector<int>, a std::array<int>, a VectorXi, or anything like that... |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]