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