fix in InitFDTD handling variable arguments

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
pull/1/head
Thorsten Liebig 2013-03-01 09:13:53 +01:00
parent 8d5043bd44
commit 130f07aef2
1 changed files with 2 additions and 1 deletions

View File

@ -39,9 +39,10 @@ endCrit = 1e-5;
if ((nargin==1) && (isnumeric(varargin{1})))
NrTS = varargin{1};
warning('openEMS:InitFDTD',['Syntax for InitFDTD has changed, use: "InitFDTD(''NrTS'', ' num2str(NrTS) ')" instead! Legacy support enabled.']);
elseif ((nargin==2) && (isnumeric(varargin{1})) && (isnumeric(varargin{2})))
elseif ((nargin>1) && (isnumeric(varargin{1})) && (isnumeric(varargin{2})))
NrTS = varargin{1};
endCrit = varargin{2};
varargin(1:2) = [];
warning('openEMS:InitFDTD',['Syntax for InitFDTD has changed, use: "InitFDTD(''NrTS'', ' num2str(NrTS) ', ''EndCriteria'', ' num2str(endCrit) ')" instead! Legacy support enabled.']);
end