function n=findming(x);
g=find(x(:)~=nan);
n=g(find(x(g)==min(x(g))));
