Let my matrix be:
A =
[1,2,3;
4,5,6;
7,8,9];
I have to extract the values in (1,2), (2,3), (3,1). I tried the following:
c = [2,3,1]';
A(:, c)
but it gives a 3x3 matrix instead of 3x1.
How can I do it efficiently in matlab?