Skip to content

Commit

Permalink
updated descriptions of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
alekseikukin committed Sep 5, 2021
1 parent ef2770f commit 0a3b56a
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion MMatrixOfStructure.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function [M, tetta2] = MMatrixOfStructure(tetta0, lambda, varargin)
% return M matrix of structure
%MMatrixOfStructure return M matrix of structure
% tetta0 - angle of incident
% lambda - wavelength
% varargin: couples of refractive indexes and thiknesses of films
Expand Down
5 changes: 5 additions & 0 deletions MReflectance.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
function [M ,tetta2]= MReflectance(N1, N2, tetta1)
%MReflectance return M matrix of border between 2 mediums
% N1 - complex refractive index of first medium
% N2- complex refractive index of second medium
% tetta1 - angle of incident
% tetta2 - angle of refraction
% M - M-matrix
[S, tetta2] = SReflectance(N1, N2, tetta1);
M = SMMatrixConverter(S);
end
Expand Down
6 changes: 5 additions & 1 deletion MTransmittance.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
function M = MTransmittance(N, d, lambda, tetta)
% return S matrix of simple film
%MTransmittance return S matrix of simple film
% N - complex refractive index
% d - thikness
% lambda - wavelength
% tetta - angle of propagation
M = SMMatrixConverter(STransmittance(N, d, lambda, tetta));
end

2 changes: 1 addition & 1 deletion SMMatrixConverter.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function B = SMMatrixConverter(A)
% Convert S matrix to M matrix and M matrix to S matrix
%SMMatrixConverter Convert S matrix to M matrix and M matrix to S matrix
B = [A(1,1) * A(2,2) - A(2,1)* A(1,2), A(1,2); -A(2,1), 1] / A(2,2);
end

2 changes: 1 addition & 1 deletion SMatrixOfStructure.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function [S, tetta2] = SMatrixOfStructure(tetta0, lambda, varargin)
% return S matrix of structure
%SMatrixOfStructure return S matrix of structure
% tetta0 - angle of incident
% lambda - wavelength
% varargin: couples of refractive indexes and thiknesses of films
Expand Down
7 changes: 6 additions & 1 deletion SReflectance.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
function [S, tetta2] = SReflectance(N1, N2, tetta1)
% return S matrix of border between 2 mediums
%SReflectance return S matrix of border between 2 mediums
% N1 - complex refractive index of first medium
% N2- complex refractive index of second medium
% tetta1 - angle of incident
% S - s-matrix
% tetta2 - angle of refraction
Tetta1 = @(n0, n1, tetta0)...
asin(real(n0) ./ real(n1) * sin(tetta0)); % Snell's law

Expand Down
2 changes: 1 addition & 1 deletion STransmittance.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function S = STransmittance(N, d, lambda, tetta)
%STransmittance return S matrix of simple film
%STransmittance return S matrix of transmittance of simple film
%N - complex rafractive index
%d - thickness
%lambda - wavelength
Expand Down

0 comments on commit 0a3b56a

Please sign in to comment.