1 2 3 4 5
% Reverses the positions of the elements of a vector function r=reverse(v); r=v([length(v):-1:1]);