QRS检测算法Matlab代码(差分阈值法)

参考论文:%参考文献: New algorithm for QT interval analysis in 24 hour Holter ECG_ performance and applications

原文算法重现:

function [PK,RRave]=QRSdetection(f,fs)
% f  -- processed data, 差分 and low pass filtered
% fs  -- sample rate
% 变量
%参考文献: New algorithm for QT interval analysis in 24 hour Holter ECG_ performance and applications


RRav=[];
timepast=0;
H=[];  % threshold
Hs=[];   % lower threshold for search back
n=0;  % qrs number
PK=[]; % qrs location
RR = [nan];
RRave=[];
BLANK = 200*fs/1000;   % 不应期
npos=[];
namp=0;
% 初始化阈值
PK1= max(abs(f(fs+1:3*fs)));

H1 = 0.8*PK1;
Hs1=0.8*H1;
for j=1:length(f)
    timepast=timepast+1;
    if timepastH1     % find a qrs
            n=n+1;
            PK(n)=j;        % s

你可能感兴趣的:(生理信号分析,算法)