Registered Member
|
Helllo
When I use eigen for computing, some times I need to add or remove some columns or rows from a matrix. For example, I have a 4*5 matrix, and I need to remove row 3, then the matrix would become 3*5. I took a look at the tutorial, but I couldn't find the function to do it. Can anybody tell me how to operate? |
Moderator
|
there is no convenient function to do so. If you want to remove the last rows and/or columns you can use A.conservativeResize(rows, cols); Otherwise you can copy the rows/columns you want to keep on top of the ones you want to delete, and then call conservativeResize().
|
Registered Member
|
With the latest version of Eigen (3.3.5), is there now an elegant way to do that?
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell