function y = downshift(x,ndown)

% circular down shift of 1-d vector x by ndown places
% input:
%	x  	vector
%	ndown	# of places to shift down
% output:
%	y 	shifted vector


y = [ x(length(x)-ndown+1:length(x));  x(1:length(x)-ndown) ];

