FIG4_12 Script to produce Fig 4.12 (top-left) and ,Fig 4.13 (top-left) pag. 204 CHQZ2 Legendre collocation/ G-NI / generalized G-NI first-derivative eigenvalues Reference: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang, "Spectral Methods. Fundamentals in Single Domains" Springer Verlag, Berlin Heidelberg New York, 2006.
0001 % FIG4_12 Script to produce Fig 4.12 (top-left) and ,Fig 4.13 (top-left) pag. 204 CHQZ2 0002 % 0003 % Legendre collocation/ G-NI / generalized G-NI first-derivative eigenvalues 0004 % 0005 % Reference: CHQZ2 = C. Canuto, M.Y. Hussaini, A. Quarteroni, T.A. Zang, 0006 % "Spectral Methods. Fundamentals in Single Domains" 0007 % Springer Verlag, Berlin Heidelberg New York, 2006. 0008 0009 % Written by Paola Gervasio 0010 % $Date: 2007/04/01$ 0011 0012 0013 0014 nu=1; 0015 fig=figure(..., 0016 'Name',['Fig. 4.12'],... 0017 'Visible','on'); 0018 0019 nx=16 % or nx= .... 0020 pbl=0; 0021 [d,A]=lgl_eig(nx,nu,pbl); 0022 plot(real(d),imag(d),'ko'); 0023 hold on 0024 pbl=1; 0025 [d,A]=lgl_eig(nx,nu,pbl); 0026 plot(real(d),imag(d),'k*'); 0027 pbl=2; 0028 [d,A]=lgl_eig(nx,nu,pbl); 0029 plot(real(d),imag(d),'k>'); 0030 legend('LC','LG-NI','Gen LG-NI',2); 0031 grid on 0032 xlabel('Real'); ylabel('Imag');