In: Physics
e1= % permittivity value of medium-1
u1= %permeability value of medium-1
e2= % permittivity value of medium-2
u2= %permeability value of medium-2
theta1= % angle of incidence
n1=sqrt(e1*u1) %refractive index of medium-1
n2=sqrt(e2*u2) %refractive index of medium-1
theta2= asin(sin(theta1)*(n1/n2)) % snell’s law
% for p-polarization
ampref=((n2*cos(theta1))-(n1*cos(theta2)))/((n2*cos(theta1))+(n1*cos(theta2))) %amplitude reflection coefficient
amptra= (2*n1*cos(theta1))/( (n2*cos(theta1))+(n1*cos(theta2))) % amplitude transmission coefficient
eneref= ampref*ampref %energy reflection coefficient
alpha=(cos(theta2)/cos(theta1))
beta=(n2/n1)
enertran=( amptra * amptra)*alpha*beta %energy transmission coefficient
% for s-polarization
ampref2=((n1*cos(theta1))-(n2*cos(theta2)))/((n1*cos(theta1))+(n2*cos(theta2))) %amplitude reflection coefficient
amptra2= (2*n2*cos(theta1))/( (n1*cos(theta1))+(n2*cos(theta2))) % amplitude transmission coefficient
eneref2= ampref2*ampref2 %energy reflection coefficient
alpha2=(cos(theta2)/cos(theta1))
beta2=(n2/n1)
enertran2=( amptra 2* amptra 2)*alpha2*beta2 %energy transmission coefficient