Automatic ECG peak detection with FFT

7 ビュー (過去 30 日間)
Charles Morgan
Charles Morgan 2020 年 1 月 9 日
コメント済み: Cris LaPierre 2020 年 1 月 9 日
Hi everyone,
I am trying to do an automatiuc detection of Hearth Rate with ECG sample.
I try to use FFT and IFFT, and a FIR filtered to eliminate low frequencies (50Hz) but after, I can't detect peaks of the signal.
I need to find locals maxima of my set of data but I don't know how to do that.
I will be grateful if you can help me with this problem.
load ECG109;
ECG = ECG109;
fresult=fft(ECG);
fresult(1 : round(length(fresult)*5/Fe))=0;
fresult(end - round(length(fresult)*5/Fe) : end)=0;
corrected = real(ifft(fresult)); % IFFT
% Low frequencies filter (50Hz)
Fn = Fe/2;
FIR = fir1(48,[49.7 50.3]/Fn,'stop');
ECG_filtered = filter(FIR,1,corrected);
subplot(2,1,1)
plot(ECG_filtered)
ECG_filtered
peaks = findpeaks(ECG_filtered,'DoubleSided')
  1 件のコメント
Cris LaPierre
Cris LaPierre 2020 年 1 月 9 日
There's somethign wrong with you mat file. I get the following error when I try to load it.
Error using load
Unable to read MAT-file C:\Users\...\ECG109.mat. Not a binary MAT-file. Try load -ASCII to read as text.

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

回答 (1 件)

Cris LaPierre
Cris LaPierre 2020 年 1 月 9 日
Do you have the Signal Processing Toolbox? If so, look into the findpeaks function.

カテゴリ

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