hw4_plot
TRANSCRIPT
-
7/25/2019 hw4_plot
1/4
6. 2. 6c)
%% Pl ot sx = . 1: . 1: 10; xi = 1. / x; % Pr essur e Ref l ect i on Coef f i ci ent R_p = ( xi - 1) . / ( xi +1) ; subpl ot ( 2, 2, 1) pl ot ( x, R_p, ' r ' )
xl abel ( ' r 1/ 21' ) yl abel ( ' R_p' ) t i t l e( ' Pr essur e Ref l ecti on Coef f i ci ent vs r 1/ r 1' ) % Pr essur e Tr ansmi ssi on Coef f i ci ent
T_p = ( 2*xi ) . / ( xi +1) ; subpl ot ( 2, 2, 2) pl ot ( x, T_p, ' g' ) xl abel ( ' r 1/ 21' ) yl abel ( ' T_p' ) t i t l e( ' Pr essur e Tr ansmi ssi on Coef f i ci ent vs r 1/ r 1' ) % I nt ensi t y Ref l ect i on Coef f i ci ent R_i = ( ( xi - 1) . / ( xi +1) ) . 2;
subpl ot ( 2, 2, 3) pl ot ( x, R_ i ) xl abel ( ' r 1/ 21' ) yl abel ( ' R_i ' ) t i t l e( ' I nt ensi t y Ref l ect i on Coef f i c i ent vs r 1/ r 1' ) % I nt ensi t y Tr ansmi ssi on Coef f i ci ent
T_i = ( 4*xi ) . / ( xi +1) . 2; subpl ot ( 2, 2, 4) pl ot ( x, T_ i , ' k' ) xl abel ( ' r 1/ 21' ) yl abel ( ' T_i ' ) t i t l e( ' I nt ensi t y Tr ansmi ssi on Coef f i ci ent vs r 1/ r 1' )
%% Li mi t ssyms xxi = 1/ x; % Pr essur e Ref l ect i on Coef f i ci ent R_p = ( xi - 1) / ( xi +1) ; R_p_0 = l i mi t ( R_p, x, 0) R_p_1 = l i mi t ( R_p, x, 1) R_p_i nf = l i mi t ( R_p, x, i nf ) % Pr essur e Tr ansmi ssi on Coef f i ci ent
T_p = ( 2*xi ) / ( xi +1) ; T_p_0 = l i mi t ( T_p, x, 0) T_p_1 = l i mi t ( T_p, x, 1) T_p_i nf = l i mi t ( T_p, x, i nf ) % I nt ensi t y Ref l ect i on Coef f i ci ent R_i = ( ( xi - 1) / ( xi +1) ) 2; R_i _0 = l i mi t ( R_i , x, 0) R_i _1 = l i mi t ( R_i , x, 1) R_ i _ i nf = l i mi t (R_ i , x, i nf ) % I nt ensi t y Tr ansmi ssi on Coef f i ci ent
T_i = ( 4*xi ) / ( xi +1) 2; T_i _0 = l i mi t ( T_i , x, 0) T_i _1 = l i mi t ( T_i , x, 1) T_i _i nf = l i mi t ( T_i , x, i nf )
-
7/25/2019 hw4_plot
2/4
0 2 4 6 8 10-1
-0.5
0
0.5
1
r1/21
Rp
Pressure Reflection Coefficient vs r1/r1
0 2 4 6 8 100
0.5
1
1.5
2
r1/21
Tp
Pressure Transmission Coefficient vs r1/r1
0 2 4 6 8 100
0.1
0.2
0.3
0.4
0.5
0.6
0.7
r1/21
Ri
Intensity Reflection Coefficient vs r1/r1
0 2 4 6 8 10
0.4
0.5
0.6
0.7
0.8
0.9
1
r1/21
Ti
Intensity Transmission Coefficient vs r1/r1
R_p_0 = 1
T_p_0 = 2
R_i_0 = 1
T_i_0 = 0
R_p_1 = 0
T_p_1 = 1
R_i_1 = 0
T_i_1 = 1
R_p_inf = -1
T_p_inf = 0
R_i_inf = 1
T_i_inf = 0
** When r1/r2 goes to 0, the intensity wave is completely reflected, while the
pressure wave reflects as the same magnitude of the incident wave, and the
transmitted pressure wave doubles in magnitude.
** When r1/r2 goes to 1, the intensity wave is completely transmitted, as is the
pressure wave.
** When r1/r2 goes to infinity, the intensity wave is completely reflected, as is
the pressure wave, but the pressure wave is out of phase.
-
7/25/2019 hw4_plot
3/4
6. 6. 1)
%% Par t ( a) % angl e of i nci dencesyms x% nor mal speci f i c acoust i c resi st ancer n = 900; % nor mal speci f i c acoust i c react ancexn = - 1200;
% acoust i c i mpedance of ai r r 1 = 415; % power r ef l ecti on coef f i ci ent Ri i = ( ( r n- r 1/ cos( x) ) 2+xn 2) / ( ( r n+r 1/ cos( x) ) 2+xn 2) ; % di f f er ent i at e wi t h r espect t o t he angl e of i nci dencepar 1 = di f f ( Ri i ) ; % set t o 0 and sol ve f or t he angl e of i nci dencepar 2 = sol ve( par 1 == 0) ; % conver t f r om symbol i c t o doubl epar3 = doubl e(par2) ; % conver t f r om r adi ans t o degr ees and f i nd t he posi t i ve angl eans_a = max( 180/ pi *par 3)
%% Par t ( b) % conver t symbol i c expr essi on t o a MATLAB f unct i onRi i = mat l abFunct i on( Ri i ) ; % f i nd t he val ue f or t he power r ef l ect i on coef f i ci ent at 80 degr eesans_b = Ri i ( 80*pi / 180)
%% Par t ( b) % f i nd t he val ue f or t he power r ef l ect i on coef f i ci ent at 0 degr eesans_c = Ri i ( 0)
ans_a = 73.9386 deg.
ans_b = 0.2984
ans_c = 0.5286
-
7/25/2019 hw4_plot
4/4
Add. Prob ii)
% k1Lx = 0: . 01: 4*pi ; % nor mal i zed i magi nar y i mpedancey = - cot ( x) ; % pl ot pl ot ( x, y) axi s([ 0, 4*pi , - 10, 10] )
t i t l e( ' Normal i zed I magi nar y I mpedance vs k1L' ) xl abel ( ' k1L' ) yl abel ( ' Normal i zed I magi nar y I mpedance' )
0 2 4 6 8 10 12-10
-8
-6
-4
-2
0
2
4
6
8
10Normalized Imaginary Impedance vs k1L
k1L
NormalizedImaginaryImped
ance