📄 main_convergence.m
字号:
% Content: Code for diffraction grating computation
% Method: Rayleigh-Fourier Method
% Algorithm: S-Matrix
% By: Huang Zhihua 2008310657 Department of Engineering Physics
% Date: 28/04/2009
function main_convergence
clc;clear all;close all
include_globals
format long
% Parameters of Incident Wave
lambda0 = 1.0;
theta = 20*pi/180;
% Parameters of Grating
P = 1;
%***********************************************************************
thick_e = [0,2.5*lambda0]; % ep = 2.5lamda
%***********************************************************************
bottom_y = [0, thick_e(1)];
period_d = 1.3*lambda0;
period_k = 2*pi/period_d;
epsilon_e = [(1.45)^2,(1.6)^2,(1.0)^2];
miu_u = [1.0,1.0,1.0];
corrugation_h = [0.1*period_d,0.1*period_d];
%************************************************************
NN = 5:2:65; % vary the truncation parameter N
%************************************************************
NUM = length(NN);
for ll = 1:NUM
N = NN(ll);
DIM = 2*N+1;
para_setting
rayleigh_fourier_computation
post_handle_convergence(ll)
end
savefile = 'convergence_data.mat';
save(savefile, 'NN','TM_reflection_eff_convergence','TM_transmission_eff_convergence','TE_reflection_eff_convergence','TE_transmission_eff_convergence')
% Modify and run "convergence_analysis.mat" to analyze the result
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -