function v=standardize(x)
% standardizes matrix.
m=mean(x); sd=sqrt(var(x)); n=size(x);
v=(x-repmat(m,n(1),1))./repmat(sd,n(1),1);
