Registered Member
|
Hi all,
I would like to ask a basic problem, I have two matrices say A,B... A = [1;2] // 2x1 matrix B = [1 2;3 4] // 2x2 matrix During runtime, I would like to increase dimension. In matlab, I do by, for i=1:3 A(:,i)=[2; 2] // increasing col B(:,:,i)=[1 3;4 5] // increasing rows and col end Please help me how I can do it by using Eigen..... Thanks in advance. |
Moderator
|
the best is not doing so because this not memory efficient (lot of reallocation and copies) but you can use .conservativeResize(rows,cols) for that.
|
Registered Member
|
Here is an example:
|
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]