% This programm reads ECG data which are saved in format 212.
% (e.g., 100.dat from MIT-BIH-DB, cu01.dat from CU-DB,...)
% The data are displayed in a figure together with the annotations.
% The annotations are saved in the vector ANNOT, the corresponding
% times (in seconds) are saved in the vector ATRTIME.
% The annotations are saved as numbers, the meaning of the numbers can
% be found in the codetable "ecgcodes.h" available at http://www.physionet.org.
%
% ANNOT only contains the most important information, which is displayed
% with the program rdann (available on http://www.physionet.org) in the 3rd row.
% The 4th to 6th row are not saved in ANNOT.
%
%
% created on Feb. 27, 2003 by
% Robert Tratnig (Vorarlberg University of Applied Sciences)
% (email: rtratnig@gmx.at),
%
% algorithm is based on a program written by
% Klaus Rheinberger (University of Innsbruck)
% (email: klaus.rheinberger@uibk.ac.at)
%
%------ SPECIFY DATA ------------------------------------------------------
%------ 指定数据文件 -------------------------------------------------------
% .dat 格式,ECG 数据
SAMPLES2READ=2048; % 指定需要读入的样本数
% 若.dat文件中存储有两个通道的信号:
% 则读入 2*SAMPLES2READ 个数据
%------ LOAD HEADER DATA --------------