You are on page 1of 5

Perbandingan 1 dan 2 = 1 dan c1 > c2

% Program Koefisien Pantulan dan Transmisi (R & T)


% n = c1/c2
% m = rho1/rho2
clear all
close all
rho1 = 800;
rho2 = 800;
c1 = 2000;
c2 = 1500;
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|');

Perbandingan 1 dan 2 = 1 dan c1 < c2


% Program Koefisien Pantulan dan Transmisi (R & T)
% n = c1/c2
% m = rho1/rho2
clear all
close all
rho1 = 800;
rho2 = 800;
c1 = 1500;
c2 = 2000;
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|');

Perbandingan 1 dan 2 = 0 dan c1 > c2


% Program Koefisien Pantulan dan Transmisi (R & T)
% n = c1/c2
% m = rho1/rho2
clear all
close all
rho1 = 0;
rho2 = 800;
c1 = 2000;
c2 = 1500;
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|');
Perbandingan 1 dan 2 = 0 dan c1 < c2

% Program Koefisien Pantulan dan Transmisi (R & T)


% n = c1/c2
% m = rho1/rho2
clear all
close all
rho1 = 0;
rho2 = 800;
c1 = 1500;
c2 = 2000;
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|');
Perbandingan 1 dan 2 = 1 dan c1 >
c2

Perbandingan 1 dan 2 = 1 dan c1 <


c2

Perbandingan 1 dan
= 0 dan c1 > c2

2
Perbandingan 1 dan 2 = 0 dan c1 <
c2

You might also like