For some "big data" processing. When plotted my data is sign wave like but with random peaks. (So imagine plotting the value of each matrix position against it's position)
I know how to find the peaks, but I need a way of then finding the value of local minima either side of the peaks and the position in the matrix. For example, if the data were:
3 2 1 0 1 2 3 7 -4 -5 -6 -5 -4 0
The function I need would return something like: min,loc = [0, -6; 4, 11]
If you have access to R2017b or later, check out the islocalmax and islocalmin functions.