Suppose I have the A matrix like this:
A = [0,0,0,0,0,0,106,10,14,20,20,23,27,26,28,28,28,23,28,28,21,18,106,14,12, 17,16,15,22,19,20,18,21,23,23,18,17,15,106,28]; >> plot(A)
I want the index of the peaks in this dataset. The answer that I'm looking for in this example, is a matrix which contains those x value in your curve when you put the "data cursor" on absolute peaks.
The answer I want is:
K = [7 23 39] which is the locations of the peaks.
When I use the
plot command in MATLAB, the peaks are clearly visible. How can I find the x value of absolute peaks? Is it possible?