?? plotsnapshot.m
字號:
function PlotSnapshot
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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 U X Y xPMLCnt yPMLCnt BoundaryType Time dT
global Mode TE TM Epsilon Mu StructureColor
global ShowStructure ShowPML False True
e=abs(BlochDiff(Epsilon,1,1,0))+abs(BlochDiff(Mu,1,1,0))+...
abs(BlochDiff(Epsilon,2,1,0))+abs(BlochDiff(Mu,2,1,0));
e=sign(e);
V=real(U);
a=(2*max(max(V))+min(min(V)))*StructureColor;
if ShowStructure==True
V=(1-e).*real(V)+a*e;
end
if ShowPML==False
V=V(xPMLCnt+1:X-xPMLCnt,yPMLCnt+1:Y-yPMLCnt);
end
figure(1);
surf(V.')
view(2)
shading interp
axis equal
axis tight
if Mode==TE
t=sprintf('TE Field (Timestep=%g, Normalized Time=%g)',Time,(Time-1)*dT);
else
t=sprintf('TM Field (Timestep=%g, Normalized Time=%g)',Time,(Time-1)*dT);
end
title(t)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -