rescale_center center input data at origin, then rescale so that all coordinates are between -1 and 1 x should be dxN
0001 % rescale_center 0002 % center input data at origin, then rescale so that all coordinates 0003 % are between -1 and 1 0004 % 0005 % x should be dxN 0006 function r=rescale_center(x) 0007 N=size(x,2); 0008 d=size(x,1); 0009 x=x-repmat(mean(x,2),[1,N]); 0010 c=max(abs(x(:))); 0011 r=x/c;