0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 nx=100;
0011 x=linspace(-1,1,nx);
0012 x=x';
0013
0014 pc=zeros(nx,5);
0015
0016 for n=1:4
0017 [pj] = jacobi_eval(x,n,-0.5,-0.5) ;
0018 pc(:,n)=pj(:,1)*2^(2*n)*(prod(1:n))^2/prod(1:2*n);
0019 end
0020
0021 figure(1);
0022 clf
0023 set(gca,'Fontname','Times','Fontsize',16);
0024 plot(x,pc(:,1),'k',x,pc(:,2),'k--','Linewidth',1);
0025 hold on
0026 plot(x,pc(:,3),'k-.','Linewidth',1);
0027 plot(x,pc(:,4),'k:','Linewidth',2);
0028 plot(x,ones(nx,1),'k--','Linewidth',1);
0029 xlabel('x','Fontname','Times','Fontsize',16);
0030 set(gca,'PlotBoxAspectRatio',[3 2 1],...
0031 'Ylimmode','manual','Ylim',[-1.2,1.2],...
0032 'Xtickmode','manual','Xtick',[-1,-0.5,0,0.5,1],...
0033 'Xgrid','on','Xminorgrid','off',...
0034 'Ygrid','on','Yminorgrid','off',...
0035 'Fontname','Times','Fontsize',16);