plot 𝑅𝑠 and 𝑅𝑝 as a function of the incident angle 𝜃1 from 0 to 90°.
% Constants
n_air = 1; % Refractive index of air
lambda_700nm = 700e-9; % Wavelength in meters
% Complex refractive index for gold at 700 nm
n_gold_700nm = 0.27732; % Real part of refractive index
k_gold_700nm = 2.9278; % Extinction coefficient
% Calculate the reflection coefficient as a function of the angle of incidence
theta1 = linspace(0, pi/2, 1000); % Incident angles from 0 to 90 degrees
theta2_700nm = asin(sin(theta1) * n_air / n_gold_700nm); % Snell's law, adjusted for complex n
% Reflection coefficient for s-polarization at 700 nm
rs_700nm = ((n_air * cos(theta1)) - (n_gold_700nm + 1i * k_gold_700nm) * cos(theta2_700nm)) ./ ...
((n_air * cos(theta1)) + (n_gold_700nm + 1i * k_gold_700nm) * cos(theta2_700nm));
Rs_700nm = abs(rs_700nm).^2;
% Plot Rs for gold at 700 nm
figure;
plot(rad2deg(theta1), Rs_700nm, 'DisplayName', 'Rs at 700 nm');
xlabel('Incident angle \theta_1 (degrees)');
ylabel('Reflection coefficient Rs');
title('Reflection Coefficient for Gold at 700 nm');
legend('show');
grid on;
I have typed this code but not getting the correct plot for it