Find local maxima of f
cows_step3_thresh&max