function B = haar_col(A);

% This function performs sums and differences column-wise for the Haar
% Transform.  The result is then placed back into the input matrix.

n = length(A);
for j = 1:n
        num = 1;
        for i = 1:2:(n-1)
                B(num,j) =  (A(i,j) + A(i+1,j))/sqrt(2);
                B(num + n/2,j) = (A(i,j) - A(i+1,j))/sqrt(2);
                num = num + 1;
        end
end