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

bug in NaN check fixed

parent c2ff3df3
No related branches found
No related tags found
No related merge requests found
...@@ -84,6 +84,9 @@ function xout=crp(varargin) ...@@ -84,6 +84,9 @@ function xout=crp(varargin)
% $Revision$ % $Revision$
% %
% $Log$ % $Log$
% Revision 5.17 2012/10/22 14:18:33 marwan
% bug fix: normalisation of data when data contains Inf
%
% Revision 5.16 2010/06/29 12:46:47 marwan % Revision 5.16 2010/06/29 12:46:47 marwan
% bug in checking the lengths of x and y % bug in checking the lengths of x and y
% %
...@@ -272,6 +275,9 @@ if isnumeric(varargin{1}) % read commandline input ...@@ -272,6 +275,9 @@ if isnumeric(varargin{1}) % read commandline input
'Embedding dimension is set to ',num2str(m),'.']) 'Embedding dimension is set to ',num2str(m),'.'])
end end
action='init'; action='init';
if size(x,1)<size(x,2), x=x'; end
if size(y,1)<size(y,2), y=y'; end
if ~isempty(find(isnan(x))) if ~isempty(find(isnan(x)))
disp('Warning: NaN detected (in first variable) - will be cleared.') disp('Warning: NaN detected (in first variable) - will be cleared.')
...@@ -281,9 +287,6 @@ if isnumeric(varargin{1}) % read commandline input ...@@ -281,9 +287,6 @@ if isnumeric(varargin{1}) % read commandline input
disp('Warning: NaN detected (in second variable) - will be cleared.') disp('Warning: NaN detected (in second variable) - will be cleared.')
for k=1:size(y,2), y(find(isnan(y(:,k))),:)=[]; end for k=1:size(y,2), y(find(isnan(y(:,k))),:)=[]; end
end end
if size(x,1)<size(x,2), x=x'; end
if size(y,1)<size(y,2), y=y'; end
Nx=length(x); Ny=length(y); Nx=length(x); Ny=length(y);
NX=Nx-t*(m-1);NY=Ny-t*(m-1); NX=Nx-t*(m-1);NY=Ny-t*(m-1);
......
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