Home > Src > Eigenvalues_1d > fig4_8.m

fig4_8

PURPOSE ^

FIG4_8 Script to produce Fig 4.8, pag. 201 CHQZ2

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 FIG4_8  Script to produce Fig 4.8, pag. 201 CHQZ2

 Chebyshev collocation 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.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % FIG4_8  Script to produce Fig 4.8, pag. 201 CHQZ2
0002 %
0003 % Chebyshev collocation 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 N=[8,16,32,64];
0014     nu=1;
0015     pbl=0;
0016 % left
0017 for nx=N
0018     npdx=nx+1;
0019     [x,wx]=xwcgl(npdx); dx=dercgl(x,npdx);
0020 A=dx(1:nx,1:nx);
0021 d=eig(A);
0022 fig=figure(...,
0023     'Name',['Fig. 4.8 N=',num2str(nx)],...
0024     'Visible','on');
0025 plot(real(d),imag(d),'ko'); grid on
0026 xlabel('Real'); ylabel('Imag');
0027 axis equal
0028 legend(['N=',num2str(nx)]);
0029 end

Generated on Fri 21-Sep-2007 10:07:00 by m2html © 2003