title: Measuring Distance Between Peaks
body: <p>I have used the (findpeaks) function in Matlab,  in order to find the locations and the value of the peaks in the signal. </p>
  
  <pre><code>findpeaks(X_Segments{1});
  </code></pre>
  
  <p>X_Segments contains the data, here is sample of the figure that I got </p>
  
  <p><img src="https://i.stack.imgur.com/Iv67J.jpg" alt="Find All Peaks in the signal"></p>
  
  <p>As shown in the figure, some of the peaks are very close to each other, therefore, I'd to filter out these peaks (remove them) in order to have Peaks in the signal at regular intervals. </p>