[n,m] = size(decision) is going to give n = 5, m = 1. ones(m,1) is then going to be the scalar 1. (1:n)' is going to be [1;2;3;4;5] and * 1 that is going to give the same. So now you are trying to sub2ind([5,1], [1;2;3;4;5], [1;2;5;4;3]) . That would require that [1,1], [2, 2], [3, 5], [4, 4], [5, 3] be valid subscripts of a 5 x 1 vector. Only the first of those is valid.
I do not know what you are trying to do there. I suspect you are trying to permute order by rows. If so then just
order(decision,:)
would be enough.