function W = walsh (n)
%  Returns the walsh matrix of size n by n
% 	W = walsh (n)


	
	H = hada (n);
	signch = zeros(1,n);

	for col= 1:n
	  for row= 2:n
	    if H(row,col)~=H(row-1,col)
	      signch(col) = signch(col) + 1;
	    end
	  end
	end

	i1 = (1:n);

	W(:,signch(i1) + 1) = H(:,i1);
	

	  