Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

% defining the loop

for n = 1:90
e = n*pi/180;
e_grad(n) = n;
Vpp = 6450;
Vsp = 3720;
Dp = 3160;
Vp = 4000;
Vs = 2310;
D = 2500;
f = asin((Vs/Vp) * sin(e));
ep = asin((Vpp/Vp) * sin(e));
fp = asin((Vsp/Vp) * sin(e));
% reflection coefficient and transmisson coefficients
A = [-sin(e) cos(f) sin(ep) cos(fp)
cos(e) sin(f) cos(ep) -sin(fp)
sin(2*e) -(Vp/Vs)*cos(2*f)
(Dp/D)*(Vp/Vpp)*((Vsp/Vs)^2)*sin(2*ep)
(Dp/D)*(Vp/Vsp)*((Vsp/Vs)^2)*cos(2*fp)
-cos(2*f) -(Vs/Vp)*sin(2*f) (Dp/D)*(Vpp/Vp)*cos(2*fp) -
(Dp/D)*(Vsp/Vp)*sin(2*fp)];
B = [sin(e)
cos(e)
sin(2*e)
cos(2*f)];
X = inv(A)*B;
A1(n) =abs(X(1));
B1(n) = abs(X(2));
Ap(n) = abs(X(3));
Bp(n) = abs(X(4));
end
figure(1);
subplot(2,2,1);
plot(e_grad, A1,'b');
xlabel('Incidence angle (Deg)');
ylabel('Absolute value(PRC)');
subplot(2,2,2);
plot(e_grad, B1,'r');
xlabel('Incidence angle (Deg)');
ylabel('Absolute value(SVRC)');
subplot(2,2,3);
plot(e_grad, Ap,'g');
xlabel('Incidence angle (Deg)');
ylabel('Absolute value(PTC)');
subplot(2,2,4);
plot(e_grad, Bp,'y');
xlabel('Incidence angle (Deg)');
ylabel('Absolute value(SVTC)');

You might also like