I have a matrix and I want to use two vectors of row and column index coordinates in order to extract the elements from it. In particular, I can define a 3 x 3 matrix as
A = [1 2 3; 3 4 5; 8 9 10]
And I want to use two vectors to extract the elements (2,2), (3,1), (1,3). My intention is to do this using the vectors for each corrdinates. I have been trying to do it by writing
but of course this is not working. I believe that this is a basic sintax issue.
Thank you so much