time series in matrix format (n rows x 2 columns). The first column should contain the time
steps and the second column should contain the values. If timeseries is a column vector
instead of a matrix, then it will be automatically converted to a matrix with
column 1 corresponding to a time index ranging from 1 to the length of timeseries
Value
Returns a named list containing:
mins
n x 3 matrix containing the index, time steps, and the local min values
maxs
n x 3 matrix containing the index, time steps, and the local max values