Skip to content
Snippets Groups Projects
Commit 915e086a authored by marwan's avatar marwan
Browse files

bug fix for logical data vectors

parent d950ce51
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@ function xout=crp_big(varargin)
% b(end+1:end+100) = 100:-1:1;
% crp_big(b,1,1,.1,'max')
%
% See also CRP, CRP2, JRP and CRQA.
% See also CRP, CRP2, JRP, TAUCRP and CRQA.
% Copyright (c) 1998-2007 by AMRON
% Norbert Marwan, Potsdam University, Germany
......@@ -78,6 +78,9 @@ function xout=crp_big(varargin)
% $Revision$
%
% $Log$
% Revision 5.11 2007/07/18 17:18:44 marwan
% integer values in the arguments supported
%
% Revision 5.10 2007/05/15 17:33:13 marwan
% new neighbourhood criterion: fixed RR
%
......@@ -162,24 +165,25 @@ check_meth={'ma','eu','mi','nr','rr','fa','in','om','op','di'}; % maxnorm, eucl
check_norm={'non','nor'}; % nonormalize, normalize
check_gui={'gui','nog','sil'}; % gui, nogui, silent
if isnumeric(varargin{1})==1 % read commandline input
varargin{9}=[];
% transform any int to double
intclasses = {'uint8';'uint16';'uint32';'uint64';'int8';'int16';'int32';'int64'};
flagClass = [];
for i = 1:length(intclasses)
i_int=find(cellfun('isclass',varargin,intclasses{i}));
if ~isempty(i_int)
for j = 1:length(i_int)
varargin{i_int(j)} = double(varargin{i_int(j)});
end
flagClass = [flagClass; i_int(:)];
% transform any int to double
intclasses = {'uint8';'uint16';'uint32';'uint64';'int8';'int16';'int32';'int64';'logical'};
flagClass = [];
for i = 1:length(intclasses)
i_int=find(cellfun('isclass',varargin,intclasses{i}));
if ~isempty(i_int)
for j = 1:length(i_int)
varargin{i_int(j)} = double(varargin{i_int(j)});
end
flagClass = [flagClass; i_int(:)];
end
if ~isempty(flagClass)
disp(['Warning: Input arguments at position [',num2str(flagClass'),'] contain integer values']);
disp(['(now converted to double).'])
end
end
if ~isempty(flagClass)
disp(['Warning: Input arguments at position [',num2str(flagClass'),'] contain integer values']);
disp(['(now converted to double).'])
end
if isnumeric(varargin{1})==1 % read commandline input
varargin{9}=[];
i_double=find(cellfun('isclass',varargin,'double'));
i_char=find(cellfun('isclass',varargin,'char'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment