Home > K25104 > PDEs > amp_fac_script_4.m

amp_fac_script_4

PURPOSE ^

Usage example for amp_fac

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Usage example for amp_fac
 related to Exercise 8.18

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Usage example for amp_fac
0002 % related to Exercise 8.18
0003 
0004 syms mu;
0005 alpha = [-mu; 1+2*mu; -mu];
0006 beta = [0; 1; 0];
0007 r = 1;
0008 s = 1;
0009 [ H ] = abs(amp_fac( alpha, beta,r,s ));
0010 figure;
0011 x = -pi:0.05:pi;
0012 H = matlabFunction(H);
0013 Hphi =@(phi) H(0.1,phi);
0014 y = Hphi(x);
0015 plot(x,y);
0016 ax = gca;
0017 ax.XTick = [-pi -pi/2 0 pi/2 pi];
0018 ax.XTickLabel = {'-\pi','-\pi/2','0','\pi/2','\pi'};
0019 hold on;
0020 
0021 Hphi =@(phi) H(0.5,phi);
0022 y = Hphi(x);
0023 plot(x,y);
0024 
0025 Hphi =@(phi) H(1,phi);
0026 y = Hphi(x);
0027 plot(x,y);
0028 
0029 Hphi =@(phi) H(10,phi);
0030 y = Hphi(x);
0031 plot(x,y);
0032 
0033 legend('\mu = 0.4','\mu = 0.5', '\mu = 1', '\mu = 10');
0034 title('modulus of amplification factor');
0035 line([-4 4],[1 1],'Color','k','LineStyle',':');

Generated on Mon 18-Jan-2016 10:25:49 by m2html © 2005