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
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....
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 user defined MATLAB program that performs power factor correction. The inputs to the MATLAB...
Write a user defined MATLAB program that performs power factor correction. The inputs to the MATLAB function should be voltage across the load (in Vrms, assume 0 phase), frequency Resistance of the load Inductance of the load power factor of the load target power factor The output of the function should be the size of the capacitor that one would need to place in parallel with the load to reach the target power factor. Please submit the code for the...
Write a program in Matlab where the program plays a hot and cold game. The user...
Write a program in Matlab where the program plays a hot and cold game. The user answers two inputs: x=input('what is the x location of the object?') y=input('what is the y location of the object?') You write the program so that the computer plays the game. Pick a starting point. Program Calculates the distance to the object. Program picks another point, calculates the distance to the object. Program knows its at the right spot when the distance is less than...
Create a Matlab program that can evaluate Green Theorem
Create a Matlab program that can evaluate Green Theorem
1. ​ a)​Write a Matlab program to define student grade program and student number with if-else...
1. ​ a)​Write a Matlab program to define student grade program and student number with if-else statement logic​​​​​​​​​ b)​Write a Matlab program for sensor selection of temperature, pressure, flow sensor with if-else statement logic​​​​​​​​​ ​ 2.​Assume there are four letters from an information source with probabilities as A1 0.5 A2 0.3 A3 0.1 A4 0.1 Generate the tag and find the corresponding gaps and binary values for each stage and the sequence of the symbols which are coded are a1a3a2a4a1.​​​...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT