Create find_cups.m

Added the find_cups() code.