function out=minbeta(X)
out=min(X,[],2);
