如何在Eigen中进行行复制?
此矩阵重复N次:
MatrixXd m(3,2);
m << 1,2,3,4,5,6;
std::cout << "m:" << std::endl;
std::cout << m << std::endl;
MatrixXd m1 = m.replicate(2, 1);
std::cout << "m1:" << std::endl;
std::cout << m1 << std::endl;
m:
1 2
3 4
5 6
m1:
1 2
3 4
5 6
1 2
3 4
5 6
但是我需要:
m2:
1 2
1 2
3 4
3 4
5 6
5 6