Hi Muhammad,
I understand that you want to segment a time series data of Center of Mass (CoM) movement from an exercise routine into individual repetitions in MATLAB.
Here are the steps to accomplish your objective:
- Use the MATLAB "findpeaks" function to identify peaks, and invert the signal (multiply by -1) to find troughs using the same function. This will give you the start and end points of each repetition.
- It's critical to adjust parameters like "MinPeakDistance", "MinPeakHeight", and "MinPeakProminence" to suit the specific traits of your CoM dataset for precise peak and trough detection.
- With the peak and trough locations identified, you can then divide the dataset into individual repetitions. Typically, a repetition starts at a trough and concludes at the following peak, or the other way around.
Additionally you may refer to the following article to know more about the findpeak function
Hope this answers your query.
Regards,
Vinayak Luha