function [y]=std_rows(x) % standardise rows of x % [m,n]=size(x); y=x-repmat(mean(x,2),1,n); v=std(y')'; i=find(v<=0); y(i,:)=0; v(i)=1; y=y./repmat(v,1,n); %