Question

In: Physics

(Optics) Write a program in Matlab that can plot the amplitude and energy reflection and transmission...

(Optics)
Write a program in Matlab that can plot the amplitude and energy reflection and transmission coefficients for both polarizations as functions of incidence angle for any incidence dielectric medium into any other dielectric medium.

Solutions

Expert Solution

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


Related Solutions

write a matlab code to simulate fiber optics communication system on matlab simulink
write a matlab code to simulate fiber optics communication system on matlab simulink
Please use MATLAB. Write a program to plot the piecewise function using IF statements and a...
Please use MATLAB. Write a program to plot the piecewise function using IF statements and a FOR loop in MatLab. Use x as the input vector. Plot from -20<=x<=20, increment of 1.   y =   4 x + 10 ,             ? ≥ 9,                   y =      5? + 5,                   0 ≤ ? < 9,                    y =     ?2 + 6? + 8, ? < 0 Plot each segment of the fn with different shaped points and a different color, for...
Write a Matlab program to create specialized plot animation with 16 frames by using fast Fourier...
Write a Matlab program to create specialized plot animation with 16 frames by using fast Fourier transforms of complex matrices
Find frequency response of the system given by following equation using MATLAB. Clearly plot both amplitude...
Find frequency response of the system given by following equation using MATLAB. Clearly plot both amplitude and phase response waveforms with labels assigned. y[n+1]-0.5 y[n]=x[n] Matlab code would be greatly appreciated
Practice for Matlab. You can create own f(x). a. Write code to find and plot a...
Practice for Matlab. You can create own f(x). a. Write code to find and plot a root using the modified secant method b. Find the roots using the roots command - identify and plot root of interest c. Use polyder and roots to find and plot the minimum value d. use fminbnd to find and plot minimum value Thank you!
This code is to be written in Matlab. Write a function that will plot cos(x) for...
This code is to be written in Matlab. Write a function that will plot cos(x) for x values ranging from -pi to pi in steps of 0.1, using black *'s. It will do this three times across in one Figure Window, with varying line widths. If no arguments are passed to the function, the line widths will be 1, 2, and 3. If on the other hand, an argument is passed to the function, it is multiplier for these values....
MATLAB: Write as a script in the editor window of matlab. Quadratic roots. Write a program,...
MATLAB: Write as a script in the editor window of matlab. Quadratic roots. Write a program, quadroots.m, for finding the roots of the second- order polynomial ax2 + bx + c. Use the quadratic equation. The inputs are the coefficients a,b, and c and the outputs are z1 and z2. The program should produce (exactly) the following output in the Command window when run with (a, b, c) = (1, 2, −3):
USE MATLAB Write a program in Matlab that would continuously ask the user for an input...
USE MATLAB Write a program in Matlab that would continuously ask the user for an input between 1 and 6, which would represent the result of rolling a die. The program would then generate a random integer between 1 and 6 and compare its value to the value entered by user. If the user’s die is larger, it should display, “Mahahanap mo na ang forever mo. Sana all!” If the user’s die is smaller, it should display, “Gising na friend,...
Write a program with the aim of performing an audiometry test at MATLAB. The program should...
Write a program with the aim of performing an audiometry test at MATLAB. The program should be as interactive as possible. For example, at first, which ear is to be tested should be chosen so that the sound is only given to that channel of the ear. In addition, whether the test frequency increases automatically or manually should be asked as a parameter. The frequencies of the person being tested should be entered by the user as well as whether...
The cos(x) function can be represented in a Taylor series shown below: Write a Matlab program,...
The cos(x) function can be represented in a Taylor series shown below: Write a Matlab program, and use a while loop, to calculate cos(150) (the input is in degrees) by adding terms of the series and stopping when the absolute value of the term that was added last is smaller than 0.0001. Make sure to make the required degree <-> radian conversions. Use fprintf to print the cos(150) (up to 2 decimal places) and the number of terms used to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT