0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 N=(8:8:64);
0015 nu=1;
0016
0017 dmin0=[];dmax0=[]; k20=[];
0018 dmin1=[];dmax1=[]; k21=[];
0019 dmin2=[];dmax2=[]; k22=[];
0020 for nx=N
0021 pbl=0;
0022 [d,A]=lgl_eig(nx,nu,pbl);
0023 d=abs(d);
0024 dmin0=[dmin0;min(d)];
0025 dmax0=[dmax0;max(d)];
0026 k20=[k20;cond(A)];
0027 pbl=1;
0028 [d,A]=lgl_eig(nx,nu,pbl);
0029 d=abs(d);
0030 dmin1=[dmin1;min(d)];
0031 dmax1=[dmax1;max(d)];
0032 k21=[k21;cond(A)];
0033 pbl=2;
0034 [d,A]=lgl_eig(nx,nu,pbl);
0035 d=abs(d);
0036 dmin2=[dmin2;min(d)];
0037 dmax2=[dmax2;max(d)];
0038 k22=[k22;cond(A)];
0039 end
0040 fig=figure(...
0041 'Name','Fig. 4.14 left',...
0042 'Visible','on')
0043 loglog(N,dmin0,'k-o',N,dmax0,'k-+')
0044 hold on
0045 loglog(N,dmin1,'k->',N,dmax1,'k-s')
0046 loglog(N,dmin2,'k-*',N,dmax2,'k-d')
0047 set(gca,'Xlimmode','manual','Xlim',[4,130],...
0048 'Ylimmode','manual','Ylim',[1.e-2,1.e6],...
0049 'Xgrid','on','XminorGrid','off','Ygrid','on','YminorGrid','off',...
0050 'LineWidth',1,...
0051 'FontName','Times','Fontsize',16,'FontWeight','normal')
0052
0053 fig=figure(...
0054 'Name','Fig. 4.14 right',...
0055 'Visible','on')
0056 loglog(N,k20,'k-o')
0057 hold on
0058 loglog(N,k21,'k->')
0059 loglog(N,k22,'k-*')
0060 set(gca,'Xlimmode','manual','Xlim',[4,130],...
0061 'Ylimmode','manual','Ylim',[10,1.e5],...
0062 'Xgrid','on','XminorGrid','off','Ygrid','on','YminorGrid','off',...
0063 'LineWidth',1,...
0064 'FontName','Times','Fontsize',16,'FontWeight','normal')