how to find duration of peak; starting and ending points

69 ビュー (過去 30 日間)
Raheema Al Karim Damani
Raheema Al Karim Damani 2020 年 2 月 25 日
回答済み: Lam Ha 2023 年 6 月 9 日
I've used findpeaks to isolate the largest peak in my signal. I wanted some help in finding the duration of the peak aka the starting and ending points of this peak, so that I could calculate area under curve? Right now Im having to visually inspect and pick arbitrary points to define this start and end points.

採用された回答

Star Strider
Star Strider 2020 年 2 月 25 日
Experiment with ths ischange function, and if you have the Signal Processing Toolbox, the findchangepts function.
  7 件のコメント
Raheema Al Karim Damani
Raheema Al Karim Damani 2020 年 2 月 25 日
Thank you your advice was helpful. The statistics arguments is really helpful in the findchangepts functions.
Star Strider
Star Strider 2020 年 2 月 26 日
As always, my pleasure!

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

その他の回答 (3 件)

Sindar
Sindar 2020 年 2 月 25 日
widths are an optional output from findpeaks:
[pks,locs,widths,~] = findpeaks(data);
  2 件のコメント
Sindar
Sindar 2020 年 2 月 25 日
Alternatively, you could potentially define the starting and ending points using findpeaks on the negative of your data.
Raheema Al Karim Damani
Raheema Al Karim Damani 2020 年 2 月 25 日
編集済み: Raheema Al Karim Damani 2020 年 2 月 25 日
I believe that it finds the widths from the half prominence or half height, which would not accurately characterize the starting and ending points.
Also, I would like to find the index (x values) of the peak based on start and end points

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


Alexis
Alexis 2021 年 7 月 9 日
編集済み: Alexis 2021 年 7 月 9 日
I had a similar issue, although I was working with biological signals. You could try the function I wrote to solve my problem: https://uk.mathworks.com/matlabcentral/fileexchange/81066-breathtimes?s_tid=srchtitle

Lam Ha
Lam Ha 2023 年 6 月 9 日
Hi, I'm doing my research and meet the same problems as you. Have you calculated the peak duration? Can you share to me how to calculate the peak duration? Thank you so much in advance

カテゴリ

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