initializesource.m

来自「fdtd计算二维光子晶体带隙」· M 代码 · 共 28 行

M
28
字号
function InitializeSource

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Electromagnetic Finite-Difference Time-Domain %
% Version 1.20, Release 1                       %
%                                               %
%   (C) Copyright 2005                          %
%   Sharif University of Technology             %
%   School of Electrical Engineering            %
%   All Rights Reserved                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

global NormalizedFrequency Profile
global SourceDuration TimeSteps Source
global xSource ySource
global Air Silicon nEff BoundaryType
global ModeNumber WaveguideWidth
global eC mC eF mF SourceWidth

if BoundaryType~=0 & BoundaryType~=6
    SourceDuration=0;
    return
end

if Source==2
    nEff=EffectiveIndex(WaveguideWidth,ModeNumber);
    Profile(1:Y)=MakeProfile(WaveguideWidth,ModeNumber,nEff);
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?