问题
I was wondering if there is a way to subset a matrix in EIGEN into another Matrix based on some condition.
For example in MATLAB, one can do this: Let A
be a matrix of size 5-by-5.
B=A(1:3,2:3)
This will create a new matrix B
from A
with dimensions 3-by-2 and with elements from A
at the relevant indices.
来源:https://stackoverflow.com/questions/33652497/extracting-some-rows-and-columns