function [U,d]=Uconj_restr_lag(dig,n)
%UCONJ_RESTR_LAG The matrix U of the restricted Stenger conjecture 
%and its eigenvalues for generalized Laguerre weight functions
%   [U,D]=UCONJ_RESTR_LAG(DIG,N) generates, partly in DIG-digit
%   arithmetic, the NxN matrix U, N <= 30, and its eigenvalues D 
%   for a generalized Laguerre weight function with parameter A>-1. 
%   The elements of U are computed by Gauss quadratures.

global a 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);
