   function C = Circulant2(a)
%
% Pre:
%      a is a row vector
%
% Post:
%      C is a circulant matrix with C(1,:) = a
%
   n = length(a);
   C = zeros(n,n);
   C(1,:) = a;
   for i=2:n
      C(i,:) = [ C(i-1,n) C(i-1,1:n-1) ];    
   end
