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

How to get submatrix from index efficiently

Tags: None
(comma "," separated)
ningl
Registered Member
Posts
1
Karma
0
Hello, Eigen community:

I have some Matlab code as follows:

A = [1 2 3;4 0 4;0 1 2];
idex_A = A == 0;
A(idex_A) = 1;

B = [1 ;2 ;3;4 ;0 ;4;0 ;1 ;2];
idex_B = B == 0;
B(index_B) = [];

Now, I want to achieve the Matlab code by Eigen Matrix. How can I achieve this efficiently? I am looking forward to your reply!

Ning


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient