openEMS/matlab/InitFDTD.m

25 lines
704 B
Matlab
Raw Normal View History

2010-04-04 17:48:36 +00:00
function FDTD = InitFDTD(NrTS, endCrit, varargin)
2010-04-07 14:31:35 +00:00
% function FDTD = InitFDTD(NrTS, endCrit, varargin)
%
% possible arguments for useage with openEMS:
% OverSampling: nyquist oversampling of time domain dumps
% CoordSystem: choose coordinate system (0 Cartesian, 1 Cylindrical)
2010-04-07 14:31:35 +00:00
%
% e.g FDTD = InitFDTD(5e5,1e-6,'OverSampling',10)
%
% openEMS matlab interface
% -----------------------
% author: Thorsten Liebig
2010-03-22 22:15:04 +00:00
FDTD.ATTRIBUTE.NumberOfTimesteps=NrTS;
FDTD.ATTRIBUTE.endCriteria=endCrit;
for n=1:numel(varargin)/2
if strcmp(varargin{2*n-1},'CoordSystem')==1
FDTD.ATTRIBUTE.CylinderCoords=varargin{2*n}==1;
else
FDTD.ATTRIBUTE.(varargin{2*n-1})=varargin{2*n};
end
2010-04-04 17:48:36 +00:00
end
2010-03-22 22:15:04 +00:00