Detecting a local minima within a specific splice of data

조회 수: 1 (최근 30일)
Abdul Rafay
Abdul Rafay 2021년 7월 5일
답변: Peter O 2021년 7월 6일
Hi,
So i am trying to create a program for arrythmia detection from a given signal. For that I have to identify PQRST regions in the ECG as well after filtering. The program will be working as a state machine, identifying R peak, and then moving on to next state where it tries to identify Q minima peak. The condition for identifying Q is that it is behind R peak, such that it is a local minima within the 0.05 seconds of the R peak. That is what i am trying to identify. I am identifying R peaks using "findpeaks" function:
%R peaks
[Peaks Locations] = findpeaks(ECG1ds,'MinPeakDistance',45); %determining R peaks
Here ECG1ds is my ECG signal which has been filtered and all that. I get all the required R peaks
The x-axis is the time in seconds. Now I want the Q peak which is the local minima just behind this R peak within 0.05 seconds. How exactly should i go for that. I'd really appreciate any sort of suggestions, or help.
Thanks.

답변 (1개)

Peter O
Peter O 2021년 7월 6일
I'm very unfamiliar with ECGs. Two ideas:
  1. Is the Q peak always the "lowest"? Flip/Invert the signal to search for the peak of Q. Minima-->Maxima. That might be fast and easy?
  2. Take a look at the islocalmin function: https://www.mathworks.com/help/matlab/ref/islocalmin.html. Since you know the timespan in which you want to look, segment the signal into vector chunks of (ix_pk-0.05):ix_pk for each peak and run the index for each function. Since you have ix_pk, you can map the reported local Q minimum location back into the full array.

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by