From 130f07aef2ff5b56b31eb0e253cd7dd3b6ac6310 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Fri, 1 Mar 2013 09:13:53 +0100 Subject: [PATCH] fix in InitFDTD handling variable arguments Signed-off-by: Thorsten Liebig --- matlab/InitFDTD.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matlab/InitFDTD.m b/matlab/InitFDTD.m index 1a0afed..6d88951 100644 --- a/matlab/InitFDTD.m +++ b/matlab/InitFDTD.m @@ -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