function [U,d]=Uconj_restr_log1(dig,n)
%UCONJ_RESTR_LOG1 The matrix U of the restricted Stenger conjecture 
%and its eigenvalues for an algebraic/logarithmic weight function
%   [U,D]=UCONJ_RESTR_LOG1(DIG,N) generates, partly in DIG-digit
%   arithmetic, the NxN matrix U, N <= 30, and its eigenvalues D 
%   for an algebraic/logarithmic weight function with parameter A. 
%   The elements of U are computed by suitable Gauss quadratures.

global ab ableg 
m=ceil(n/2);
U=zeros(n);
abn=ab(1:n,:); ablegm=ableg(1:m,:); 
xwn=gauss(n,abn); xn=xwn(:,1);
xwlegm=gauss(m,ablegm); xlegm=xwlegm(:,1); wlegm=xwlegm(:,2);
for j=1:n
  cn=xn(j);
  for k=1:n
    s1=0;
    for i=1:m
      x=cn*xlegm(i);  
      lag=lagrange(n,xn,x);
      s1=s1+wlegm(i)*lag(k);
    end
    U(j,k)=cn*s1;
  end
end
digits(dig);
sU=vpa(U); d=eig(sU);
d=double(d);
U=double(sU);
