I have a collection of data consists of TIME and TEMPERATURE as follow:
(time1, temp1), (time2, temp2), (time3, temp3), ... (time-n temp-n).
I cannot come up with a good computer algorithm to find the local min(s) and local max(s). Not sure what is the best approach here.
How about if (temp1 > temp2 and temp2 < temp3) then temp2 is a local minimum?