0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 nx=100;
0011 x=linspace(-1,1,nx);
0012 x=x';
0013 n=4;
0014
0015
0016 [pj] = jacobi_eval(x,n,0,0) ;
0017 pl=pj(:,1);
0018
0019
0020 [pj] = jacobi_eval(x,n,-0.5,-0.5) ;
0021 pc=pj(:,1)*2^(2*n)*(prod(1:n))^2/prod(1:2*n);
0022
0023
0024 nu=-3/4;
0025 [pj] = jacobi_eval(x,n,nu-0.5,nu-0.5) ;
0026 pg1=pj(:,1)*gamma(nu+0.5)*gamma(2*nu+n)/(gamma(nu+n+0.5)*gamma(2*nu));
0027
0028
0029
0030 nu=0;
0031 [pj] = jacobi_eval(x,n,nu-0.5,nu-0.5) ;
0032 pg2=pj(:,1)*gamma(nu+0.5)*gamma(2*nu+n)/(gamma(nu+n+0.5)*prod(1:2*nu));
0033
0034
0035
0036 figure(1);
0037 clf
0038 set(gca,'Fontname','Times','Fontsize',16);
0039 plot(x,pl,'k',x,pc,'k--','Linewidth',1);
0040 hold on
0041 plot(x,pg1,'k-.','Linewidth',1);
0042 plot(x,pg2,'k:','Linewidth',2);
0043 xlabel('x','Fontname','Times','Fontsize',16);
0044 l=legend('Legendre','Chebyshev','Gegenbauer, \nu =-3/4',...
0045 'Gegenbauer, \nu =0');
0046 set(gca,'PlotBoxAspectRatio',[3 2 1],...
0047 'Ylimmode','manual','Ylim',[-1.2,1.2],...
0048 'Xtickmode','manual','Xtick',[-1,-0.5,0,0.5,1],...
0049 'Xgrid','on','Xminorgrid','off',...
0050 'Ygrid','on','Yminorgrid','off',...
0051 'Fontname','Times','Fontsize',16);
0052 set(l,'Position',[0.364,0.15,0.309,0.279]);