Home > sgwt_toolbox > demo > rescale_center.m

rescale_center

PURPOSE ^

rescale_center

SYNOPSIS ^

function r=rescale_center(x)

DESCRIPTION ^

 rescale_center
 center input data at origin, then rescale so that all coordinates
 are between -1 and 1
 
 x should be dxN

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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;

Generated on Fri 30-Apr-2010 17:49:57 by m2html © 2003