function y=vshift(x,n)
% vshift
%	y=vshift(x,n)
%	Shift the matrix x vertically down by n lines circulary.
%	If n is negative, the shift is upward.

N=size(x,1);

if n>=0
  y=[x(N-n+1:N   , :) 
     x(    1:N-n , :)];
else
  n=abs(n);
  y=[x(n+1:N , :) 
     x(  1:n , :)];
end