From 9ed65b9fda2437378036df67f635cb6a279c67f4 Mon Sep 17 00:00:00 2001 From: marwan <> Date: Tue, 29 Jun 2010 12:47:30 +0000 Subject: [PATCH] some minor bugs in output and test of time series lengths (of x and y) --- crp2.m | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/crp2.m b/crp2.m index faef0cb..2fdc261 100644 --- a/crp2.m +++ b/crp2.m @@ -86,6 +86,9 @@ function xout=crp2(varargin) % $Revision$ % % $Log$ +% Revision 5.17 2009/03/24 08:31:17 marwan +% copyright address changed +% % Revision 5.16 2008/07/02 11:59:22 marwan % new norms: DTW and Levenshtein % bug fix for logical data vectors @@ -309,6 +312,9 @@ if isnumeric(varargin{1}) % read commandline input error(['Too less data',10,... 'Either too much NaN or the number of columns in the vectors do not match.']) end + if(size(x,2) ~= size(y,2)) + error(['Matrix dimensions must agree.']) + end ds=eye(m); else % read input from the GUI @@ -436,6 +442,8 @@ if nogui>0 tx(8)={'order matrix'}; tx(9)={'order pattern'}; tx(10)={'distance plot'}; + tx(11)={'distance plot'}; + tx(12)={'distance plot'}; disp(['use method: ', char(tx(method))]); if nonorm==1, disp('normalize data'); else disp('do not normalize data'); end end @@ -1697,13 +1705,16 @@ set(0,'ShowHidden','Off') %if 0 catch - try, if nogui==0 - for i=1:length(obj.enable), set(obj.children(i),'Enable',obj.enable{i}); end - set(h(1),'String','Apply',... - 'ToolTip','Starts the computation - be patient.',... - 'Callback','crp compute') - setptr([hCRP,hCtrl],'arrow') - end, end + try + if nogui==0 + for i=1:length(obj.enable), set(obj.children(i),'Enable',obj.enable{i}); end + set(h(1),'String','Apply',... + 'ToolTip','Starts the computation - be patient.',... + 'Callback','crp compute') + setptr([hCRP,hCtrl],'arrow') + end + if nargout, xout = NaN; end + end z=whos;x=lasterr;y=lastwarn;in=varargin{1}; print_error('crp2',z,x,y,in,mflag,action) try, set(0,props.root), end -- GitLab