フィルターのクリア

How to identify the start and stop in a series of data

1 回表示 (過去 30 日間)
Muhammad Nuradam Shah Bin Nurshahin
Muhammad Nuradam Shah Bin Nurshahin 2021 年 1 月 15 日
コメント済み: Eva DI NOIA 2022 年 6 月 28 日
Hello, I am trying to determine the beginning and the end of a full movement. So I have as sensor, that I used to collect data for specific movement. If i were to plot it out, I can see 3 mountains/peaks, with a relatively stable segment in between each mountain. I would like to identify the start and stop of each mountain. How do I do so? Any algorithm to find the start and end of a movement?
  1 件のコメント
Mohammad Sami
Mohammad Sami 2021 年 1 月 15 日
I suggest you see the following video from Loren Shure.

サインインしてコメントする。

回答 (1 件)

Manish Mahalwal
Manish Mahalwal 2021 年 1 月 18 日
Hi,
This solution may vary according to the type of data you have but by what you described this should work.
You can find the local maximas using findpeaks.
[pks,locs] = findpeaks(data)
'locs' contains the location of the local maximas that is the x-coordinate. Now you will have to use these peaks to find the local minimas which surround these peaks. For this, you can use islocalmin to find the points of local minima.
TF = islocalmin(A)
This returns a logical array whose elements are 1 (true) when a local minimum is detected in the corresponding element of an array, table, or timetable.
Now you iterate over 'locs' to find the value immediately smaller and greater using TF and A (the two local minimas surrounding the peak). The two values that you get would be the start and end of the corresponding peak.
Hope this helps.
  1 件のコメント
Eva DI NOIA
Eva DI NOIA 2022 年 6 月 28 日
Hello,
Can you explain your method to me? I don't know how to use "islocalmin" is for finding the minima that surround these peaks. What is "A"?
Thank you for your help

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by