function [vecs,veclens] = util_normalize_vectors(vecs)
%normalize vecs, which is m*n matrix, a list of n vectors, each having m
%dimensions

lens = sqrt(sum(vecs.^2,1));
veclens = lens;
lens(lens==0) = 1;
vecs = vecs./repmat(lens,size(vecs,1),1);

end