cows_step3_thresh&max
Find local maxima of f