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

Reflection Write a program in Python or Matlab to perform reflection of an image about its...
Reflection Write a program in Python or Matlab to perform reflection of an image about its y-axis. Apply your program to an image of your choice to demonstrate the reflection. Do not use transpose library.
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):
Write a MATLAB program to simulate the FIFTY dice game that can automatically play the FIFTY...
Write a MATLAB program to simulate the FIFTY dice game that can automatically play the FIFTY dice game for any amount of players, keep scores for all the players, clearly show the game progress for every round, every player, and every roll in the command window, automatically ends the game when the first player accumulates 50 points or more game score, and automatically select the game winner and the winning game score. i have coded most of the game, i...
Write Java Program. (Plot the sine and cosine functions) Write a program that plots the sine...
Write Java Program. (Plot the sine and cosine functions) Write a program that plots the sine function in red and cosine in blue, as shown in Figure 14.48c. Hint: The Unicode for P is u03c0. To display -2p, use Text(x, y, "-2\u03c0"). For a trigonometric function like sin(x), x is in radians. Use the following loop to add the points to a polyline: Polyline polyline = new polyline (); ObservableList<Double> list = polyline.getPoints (); double scaleFactor = 50; for (int...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT