?? runfdtd.m
字號:
function RunFDTD
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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 Time TimeSteps SnapshotTimes BoundaryType
global xProbe yProbe U TimeDecimation PowerTime
global Animate True False
USave=[];
d=-1;
InitialField;
for Time=1:TimeSteps
AdvanceMTime;
AdvanceETime;
AddSource;
if ismember(Time,SnapshotTimes)
GenerateSnapShot;
end
if Time>=PowerTime
MeasurePower;
end
d=mod(d+1,TimeDecimation);
if d==0
USave=[USave; real(U(xProbe,yProbe))];
end
if Animate==True
PlotSnapshot
pause
end
end
if BoundaryType==0 | BoundaryType==6
PlotSnapshot;
end
SaveField(USave)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -