Extracting individual breathing cycles from a signal and plotting the mean cycle

17 ビュー (過去 30 日間)
Gail Distefano
Gail Distefano 2022 年 2 月 24 日
コメント済み: Star Strider 2022 年 3 月 10 日
I have a breathing trace, which I have smoothed and use FindPeaks to identify the peaks. How do I extract the individual beathing cyles between the peaks so that I can plot these over each other and calculate the mean breathing cycle?
I know there is a baseline shift so I also need to look at detrending the data first.
I would be very grateful for any input or direction to where I might find information on how to do this.
I have tried to extract the first 3 regions of interest but an 'unrecognized function error'.
roilims = [0 227; 227 480; 480 745];
>> sigroi = extractsigroi(dt_B,roilims);
Unrecognized function or variable 'extractsigroi'.

回答 (2 件)

Star Strider
Star Strider 2022 年 2 月 24 日
If the peaks define the cycle, then finding the ‘valleys’ between them will define the beginning and end points of each cycle. I would use either findpeaks with the negative of the signal (turning the ‘valleys’ into peaks) or the islocalmin function.
An example of that to create an ensemble average (not necessary, use only the parts of the code that apply to your problem) is Combining repetitive curves into one average curve and specifically this Comment.
.
  11 件のコメント
Gail Distefano
Gail Distefano 2022 年 3 月 10 日
Hi, I just wanted to say thanks very much for your reply and times taken to assist me. For a strange reason I did not get a notification so have only just seen this reply. It is extremely helpful. Thanks once again
Star Strider
Star Strider 2022 年 3 月 10 日
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

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


Cris LaPierre
Cris LaPierre 2022 年 2 月 24 日
extractsigroi is part of the Signal Processing Toolbox. It would appear you do not have it installed. If you have access to it through your license, you can add it using the Add-Ons explorer.
  2 件のコメント
Gail Distefano
Gail Distefano 2022 年 2 月 24 日
Thank you. But I definitely have Signal Processing Toolbox installed. Could it be that it is not included in Vn2019b?

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

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by