This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Eigen how to concatenate matrix ?

Tags: None
(comma "," separated)
m.sheida87
Registered Member
Posts
1
Karma
0

Eigen how to concatenate matrix ?

Sat Oct 11, 2014 5:47 am
hi,
I have 3 vertical eigen matrices and I would like to concatenate them, like in matlab C=[B1;B2; B3 ];
i want concatenate them In this case, C(B1.cols()+B2.cols()+B3.cols(),1)
MatrixXd B1,B2,B3,B4;
C<<B1,B2,B3;

Is there anything equivalent in eigen?
Thanks.
jitseniesen
Registered Member
Posts
204
Karma
2

Re: Eigen how to concatenate matrix ?

Sun Oct 12, 2014 10:08 am
I am not sure exactly what the question is. It seems that the command C<<B1,B2,B3 that you mention is precisely what you want: it can be used to concatenate matrices vertically and horizontally. See our documentation page at http://eigen.tuxfamily.org/dox/group__T ... ation.html for some more details.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]