From f179d7c3415105bb036b2dbcfb1e4494a6419cd5 Mon Sep 17 00:00:00 2001
From: marwan <>
Date: Thu, 9 Jul 2015 16:15:25 +0000
Subject: [PATCH] bug in NaN check fixed

---
 crp.m | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/crp.m b/crp.m
index 9ad81bd..3df78e2 100644
--- a/crp.m
+++ b/crp.m
@@ -84,6 +84,9 @@ function xout=crp(varargin)
 % $Revision$
 %
 % $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
 % bug in checking the lengths of x and y
 %
@@ -272,6 +275,9 @@ if isnumeric(varargin{1}) 		% read commandline input
               'Embedding dimension is set to ',num2str(m),'.'])
      end
      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)))
      disp('Warning: NaN detected (in first variable) - will be cleared.')
@@ -281,9 +287,6 @@ if isnumeric(varargin{1}) 		% read commandline input
      disp('Warning: NaN detected (in second variable) - will be cleared.')
      for k=1:size(y,2),  y(find(isnan(y(:,k))),:)=[]; 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=Nx-t*(m-1);NY=Ny-t*(m-1);  
-- 
GitLab