function b = isbimodal(M) x = unique(round(M*10000),'rows'); b = (size(x,1)<=2); return