0% found this document useful (0 votes)
11 views2 pages

Document

The document presents a MATLAB script that calculates and plots the reflection coefficients and phase changes for light incident at various angles on a boundary between two media with different refractive indices. It computes the reflection coefficients for both parallel and perpendicular polarizations and visualizes these values along with their corresponding phase changes as functions of the angle of incidence. The results are displayed in two separate plots, providing insights into how these optical properties vary with the angle of incidence.

Uploaded by

wafaa sherif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Document

The document presents a MATLAB script that calculates and plots the reflection coefficients and phase changes for light incident at various angles on a boundary between two media with different refractive indices. It computes the reflection coefficients for both parallel and perpendicular polarizations and visualizes these values along with their corresponding phase changes as functions of the angle of incidence. The results are displayed in two separate plots, providing insights into how these optical properties vary with the angle of incidence.

Uploaded by

wafaa sherif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

clc; clear; close all;

% Given values

n1 = 1.00; % Refractive index of medium 1 (air)

n2 = 1.44; % Refractive index of medium 2

n = n2 / n1; % Relative refractive index

theta_i = linspace(0, pi/2, 1000); % Angle of incidence from 0 to 90 degrees


in radians

% Compute reflection coefficients r_parallel and r_perpendicular

cos_theta_i = cos(theta_i);

sin_theta_i = sin(theta_i);

sqrt_term = sqrt(n^2 - sin_theta_i.^2);

r_parallel = (sqrt_term - n^2 .* cos_theta_i) ./ (sqrt_term + n^2 .*


cos_theta_i);

r_perpendicular = (cos_theta_i - sqrt_term) ./ (cos_theta_i + sqrt_term);

% Compute phase changes phi_parallel and phi_perpendicular

tan_phi_parallel_half = sqrt((sin_theta_i.^2 - n^2) ./ (n^2 .* cos_theta_i));

tan_phi_perpendicular_half = sqrt((sin_theta_i.^2 - n^2) ./ cos_theta_i);

phi_parallel = 2 * atan(tan_phi_parallel_half) - pi;

phi_perpendicular = 2 * atan(tan_phi_perpendicular_half);

% Plot reflection coefficients

figure;
plot(rad2deg(theta_i), r_parallel, 'r', 'LineWidth', 2); hold on;

plot(rad2deg(theta_i), r_perpendicular, 'b', 'LineWidth', 2);

xlabel('Angle of Incidence (\theta_i) [degrees]');

ylabel('Reflection Coefficients');

legend('r_{\parallel}', 'r_{\perp}');

title('Reflection Coefficients vs. Angle of Incidence');

grid on;

% Plot phase changes

figure;

plot(rad2deg(theta_i), phi_parallel, 'r', 'LineWidth', 2); hold on;

plot(rad2deg(theta_i), phi_perpendicular, 'b', 'LineWidth', 2);

xlabel('Angle of Incidence (\theta_i) [degrees]');

ylabel('Phase Change [radians]');

legend('\phi_{\parallel}', '\phi_{\perp}');

title('Phase Change vs. Angle of Incidence');

grid on;

You might also like