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

Submatrix with non-consecutive indices in Eigen

Tags: None
(comma "," separated)
carlonicolini
Registered Member
Posts
1
Karma
0
I'm interested in forming a square submatrix from another dynamic size matrix in Eigen, by specifying explicitly the indices.
In particular, what is the Eigen equivalent of this operation in Matlab/Octave?
Code: Select all
A=magic(6);
ind=[1,4,5,6];
A(ind,ind)

I can't understand how to do that using blocks or views.
A view would be the best option, because it is not necessary to create temporary matrices.


Bookmarks



Who is online

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