How can I take elements of matrix A and use it like indices of the vector B for obtaining a new matrix C that contain elements B between indices?
For example, I have A and B and I want C
A = [2, 5; 6, 9; 10, 14]
B = [ 3, 4, 6 , 10, 9, 5, 34, 33, 90, 31, 2, 9, 14, 16]
C = [4, 6, 10, 9 ; 5, 34, 33, 90; 31, 2, 9, 14, 16]
Best Answer