% Sample entry for the 2014 PhysioNet/CinC Challenge.
% This function should takes three parameters:
% String specifying the record name to process
% This function has no output arguments, its writes an "recordName.qrs" annotation file
% at the current directory. Do not include file extensions on the recordName string.
% The annotations file should contain all the beats that you were able
% to detect in the record.
% 1) This function requires that you have the WFDB
% App Toolbox installed. For information on how to install the toolbox
% please see:
% Please note that the Toolbox is supported only on MATLAB 2013a
% and 2013b. Supported operating systems are 64 bit versions of:
% Linux, Mac OS X, and Windows.
% 2) The CHALLENGE function requires that you have downloaded the challenge
% data 'set-p' in a subdirectory of the current directory. The subdirectory
% should be called '/challenge/2014/set-p/' . The 'set-p' dataset can
% be downloaded from PhysioNet at:
% This dataset is used by the generateValidationSet.m script to
% create the annotations on your traing set that will be used to
% verify that your entry works properly in the PhysioNet testing
% Version 0.9
% See also: RDSAMP, RDANN, WRANN, GQRS, ECGPUWAVE, SQRS, WQRS, WABP
% Written by Ikaro Silva, December 10, 2013.
% Last Modified: February 11, 2014
% %Example using training data-
%This line is required in order to properly load the WFDB Toolbox
%in the Octave testing framework
%Used for discarding annotations that dont have a minimum number of beats
annName='qrs'; %All competitors are expected to save their annotation as *.qrs
%Get all ECG and blood pressure signals
ecg_ind=get_index(description,'ECG'); %Call subfunction to get channel indices
%%Users can access the raw samples of the record by running the following
%%For more information please see the help in RDSAMP
%Annotated the first ECG channel with GQRS and default values to generare QRS file
%Run WABP on the record, which by default will analyze the first ABP, ART, or BP signal
%Read annotations back to compare with ECG annotations to find the one
%with smallest RR variance (our best estimate)
%If ABP has smallest annotation, overwrite the qrs file from GQRS
movefile([recordName '.wabp'],[recordName '.' annName]);
%%%%%%%%%%%% Helper Function %%%%%%%%%%%%%%%%%%%%%