add new utility functions:
ismember(a, b)
findEERTh(a, b, th0, th1)