You are on page 1of 1

% Program Koefisien Pantulan dan Transmisi (R & T)

% n = c1/c2
% m = rho1/rho2
clear all
close all
rho1 = 1500;
rho2 = 1000;
c1 = 1509;
c2 = 2609;
n=c1/c2;
m=rho1/rho2;
% Sudut Datang (thetai)
thetai=linspace(0,pi/2,100);
% sin (thetai) = (si) dan Cos (thetai) = ci
si=sin(thetai);
ci=cos(thetai);
% Sudut Transmisi (thetat)
% sin (thetat) = (st) dan Cos (thetat) = ct
st = 1/n*si;
thetat = asin(st);
ct = cos(thetat);
% Z1/Z2 = Z1Z2
% R = (1 - Z1/Z2)/(1+Z1/Z2)
% T = 2/(1+Z1/Z2)
Z1Z2 = n*m*ct./ci;
R = abs((1-Z1Z2)./(1+Z1Z2));
T = abs(2 ./(1+Z1Z2));
subplot(2,1,1), plot(thetai*180/pi, R)
xlabel('Sudut Datang (\theta_i) (^o)')
ylabel('|R|')
%figure
subplot(2,1,2), plot(thetai*180/pi, T)
xlabel('Sudut Datang (\theta_i) (^o)')
ylabel('|T|')
figure
plot(thetai*180/pi, R, thetai*180/pi, T)
xlabel('Sudut Datang (\theta_i) (^o)')
ylabel('|R| dan |T|')
h=legend('|R|', '|T|');

You might also like