[1:2:4 4:2:1]
[eye(1) ones(1, 2); zeros(2, 1) diag(1:2)]
repmat([1 2], 2, 1)
M = [5 4 3 2 1]; M([5 1])
M = [1 2 3 4 5]; M([1:2 5:-1:4])
M = [1 2 3; 4 5 6; 7 8 9]; M(1, [3 2 1])
M = [1 2 3; 4 5 6; 7 8 9]; M(1:2, 3:-1:2)