function [ H ] = haar( N )
    
    H = [1 1 ; 1 -1];

    for n = 2 : log2(N);
    
    H = [kron(H,[1,1]);kron(eye(2^(n-1),2^(n-1)),[1,-1])];

    end

end

