function mat = matquasiper(n,a,l,th)

mat = [];

for k = 1:(n-1)
        mat(k+1,k) = -1;
end

for k = 1:(n-1)
        mat(k,k+1) = -1;
end

for  k = 1:n
        mat(k,k) = 2+l*(cos(2*pi*k*a+th));
end

res = mat;

end
