min loss hash code.matlab