QT Interval Measurement: The PhysioNet/Computing in Cardiology Challenge 2006 1.0.0

File: <base>/sources/roberto-sassi/rrpattern.m (598 bytes)
%~ rrpattern.m - Part of the trqt package submitted for the 2006 CinC challenge
%~ Copyright (C) 2006  DA Tironi, R Sassi and LT Mainardi
%~ This software is released under the terms of the GNU General
%~ Public License (http://www.gnu.org/copyleft/gpl.html).

function[listaQT] = rrpattern(listaQT)

Col_RR = 1; %colonna RR
Col_P = 4; %colonna pattern
Col_F = 5; %colonna famiglia

th1 = 30;

for c1=2:size(listaQT, 1)
    if(listaQT(c1, Col_P) == 1 && abs(listaQT(c1, Col_RR) - listaQT(c1-1, Col_RR)) < th1 )
       listaQT(c1, Col_F) = 1;
    else
       listaQT(c1, Col_F) = 0;
    end
end