title: Finding the first, second and third maxima in the plot
body: <p>I want to find the first, second and third peaks in the data set that I have plotted using MATLAB. Can someone help me with this? Here is the link to the plot that I have uploaded </p>
  
  <p><img src="https://i.stack.imgur.com/BK9gT.jpg" alt="enter image description here"></p>
  
  <p>The central idea is to find peaks which occur after certain time interval. The second condition is just to store the first four peaks and then break the condition. So I find the first maxima value in the graph. I see the time value which is 2530 on X-axis. I then do not look in the immediate neighbourhood but look for a peak which comes after 180-200 on X-axis. I get peak 2 which is then stored . Then again I jump by 180-200 and again search for peaks in the neighbourhood. Finally after getting the first four maximas I stop searching for peaks</p>