
function A=hankel_matrix(n)

A=zeros(n,n);

for i=1:n
    for j=1:n
        k=j-n+i;
        if k > 0
            A(i,j)=2^k;
        else
            A(i,j)=2^(1/(2-k));
        end
    end
end