function [ab,Ncap,kount]=sr_lower_subrange_jacobi(nofdig,N)
%SR_LOWER_SUBRANGE_JACOBI Recurrence coefficients for lower
%subrange Jacobi polynomials.
%   [AB,NCAP,KOUNT]=SR_LOWER_SUBRANGE_JACOBI(NOFDIG,N)
%   generates in DIG-digit arithmetic, to an accuracy of NOFDIG
%   digits, the Nx2 array AB of recurrence coefficients for the
%   weight function
%          w(x)=(1-x)^a*(1+x)^b  on -1<=x<=c,  -1<c<=1.
%   NCAP and KOUNT are output variables inherited from the routine
%   smcdis.m. The variables dig, c, a, b must be assigned in the
%   script calling this routine and declared global. If an error 
%   message appears, try to increase Nmax.

global mc mp iq idelta irout AB dig c a b
mc=2; mp=0; iq=1; idelta=1; irout=1; AB=[[-1 0];[0 1]];
digits(dig); eps0=.5*10^(-nofdig); Nmax=3000;
s1=vpa(1); s2=vpa(2); c=vpa(c); a=vpa(a); b=vpa(b);
[ab,Ncap,kount]=smcdis(dig,N,eps0,@squadlsubj,Nmax);
ab(:,1)=((s1+c)*ab(:,1)-(s1-c))/s2; ab(1,2)=ab(1,2)*(s1+c)/s2;
ab(2:N,2)=ab(2:N,2)*((s1+c)/s2)^2;
