-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
transmission_s.m
28 lines (25 loc) · 898 Bytes
/
transmission_s.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function t_s = transmission_s(angle_1, lambda, N0, N1, varargin)
% transmission_s - return s component of transmittion
% N0 - top refrative index
% N1 - bottom refractive index
% fi -angle of incident
% d - thikness of layer
% varargin d(i-1), Ni
lambda = CheckAndTurn(lambda);
N0 = CheckAndTurn(N0);
N1 = CheckAndTurn(N1);
angle_2 = asin(N0 * sin(angle_1) / N1);
if isempty(varargin)
t_s = 2 * N0 * cos(angle_1) / (N0 * cos(angle_1) + N1 * cos(angle_2));
else
di = varargin{1};
betta_1 = Betta(N0, N1, angle_2, lambda, di);
t_s01 = transmission_s(angle_1,lambda, N0, N1);
t_s12 = transmission_s(angle_2,lambda, N1, varargin{2 : end});
r_s01 = reflection_s(angle_1,lambda, N0, N1);
r_s12 = reflection_s(angle_2,lambda, N1, varargin{2 : end});
t_s =...
(t_s01 * t_s12 * exp(-1i * betta_1)) /...
(1 + r_s01 * r_s12 * exp(-2i * betta_1));
end
end