Suppose I have the F matrix like this:
F =
0, 0, 106, 10, 14, 20, 20, 23, 27, 26, 28, 28, 28, 23
| | |
peak peak peak
I'm using the command plot(F)
. I want to get the indexes of the peaks in the data.
This is the code I have so far, it does not work:
[max_x,index_x]=max(x);
e=index_x;
for i=1:11
index_x(i)=e;
e=e+16;
end
Is there a builtin function in matlab that will do this for me?