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 *function* that draws a spiral by using the plot() command to connect-the-dots of...
Write a MATLAB *function* that draws a spiral by using the plot() command to connect-the-dots of a set of points along the spiral's trajectory. The function should have three input arguments: the number of points along the trajectory, the number of rotations of the spiral, and the final radius of the spiral. The function does not need any output arguments. Use nargin to provide default values for the input arguments. The spiral should begin at the origin. At each step...
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,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT