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