Home > K25104 > PDEs > amp_fac_script_2.m

amp_fac_script_2

PURPOSE ^

Usage example for amp_fac

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Usage example for amp_fac
 related to Exercise 8.12

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

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