function [ab,Ncap]=r_subjacobi(N,eps0,c,a,b)
%R_SUBJACOBI Recurrence coefficients for an orthogonal
%polynomial related to a subrange Jacobi polynomial.
%   [AB,NCAP]=R_SUBJACOBI(N,EPS0,C,A,B) generates to a 
%   relative accuracy EPS0 the Nx2 array AB of recurrence 
%   coefficients for the weight function w(x)=(1-C*x)^A
%   *(1+C*x)^B, -1<=x<=1, 0<C<=1, using a one-component
%   discretization procedure. The output variable NCAP is
%   the number of quadrature points needed in the discretization
%   to achieve the desired accuracy. If an error message appears,
%   try to increase Nmax in the third line of the code.
%   Reference: Walter Gautschi, "Sub-range Jacobi polynomials",
%   Numer. Algorithms 61, 649-657 (2012), Section 2.
 
global mc mp iq idelta irout AB
mc=1; mp=0; iq=0; idelta=1; irout=1; AB=[-1 1];
Nmax=2000;
[ab,Ncap,kount]=mcdis(N,eps0,@quadgp,Nmax);
