function n=findmin(x);
n=find(x==min(x));
