function DATA=rownorm(DATA)
% format:  function XN=rownorm(DATA)
% row sum of squared elements =1 
% written by E. Gallagher, 
% Internet: Gallagher@umbsky.cc.umb.edu
% revised: 7/8/95
% N=sqrt(diag(X*X')); old method, the new method's faster:
% XN=diag(N)\X;
% new faster:
N=sqrt(sum((DATA.^2)')');
[R,C]=size(DATA);
DATA=DATA./N(:,ones(C,1)); % Matlab col copy trick