www.pudn.com > normalization.rar > dataSt.m, change:2011-03-04,size:400b


function r=dataSt(x) 
% center and normalize the x matrix according to the mean and the standard deviation 
% of the data 
% x uses line vectors (data) 
 
% Gaston Baudat & Fatiha Anouar / 21st October 2000 / Exton PA 19341 USA 
% Designed under MatLab for Windows version 5.2.0.3084 
 
[m,n]=size(x); 
r=zeros(m,n); 
mx=mean(x); 
sd=sqrt(diag(cov(x)))'; 
for i=1:m 
   r(i,:)=(x(i,:)-mx)./sd; 
end