function a_shuffled=peremesh_matrix(a);

%    for ii=1:n*3
  %      xx=round(random('unif',1,n));
        yy=round(random('unif',1,n));
        tempp=a(xx,:);
        a(xx,:)=a(yy,:);
        a(yy,:)=tempp;
        xx=round(random('unif',1,col));
        yy=round(random('unif',1,col));
        tempp=a(:,xx);
        a(:,xx)=a(:,yy);
        a(:,yy)=tempp;
        
        %    end
a_shuffled=random('unif',min(min(a)),max(max(a)),size(a));