且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将MIT-BIH心律失常ECG数据库加载到MATLAB上

更新时间:2022-10-18 21:08:59

a href =http://physionet.org/cgi-bin/atm/ATM =nofollow noreferrer> ATM 以获取更易于使用的 .mat 文件。



输入部分中选择所需的潜在客户,长度,数据库和样本。



工具箱中选择导出为.mat





然后下载.mat文件,



>



为了在MATLAB中打开文件,下面是一个示例代码:

 负载('100m.mat')%信号将被加载到val矩阵
val =(val - 1024)/ 200; %你必须删除base和gain
ECGsignal = val(1,1:1000); %选择铅(铅I)
Fs = 360; %采样频率
t =(0:长度(ECG信号)-1)/ Fs; %time
plot(t,ECGsignal)



>



但是,如果您要阅读心律失常 QRS复合体注释文件,这将是另一个问题。



编辑



> gain 来自 info 文件(第二张图片)。
此文件提供了有关ECG信号的各种信息。





在最后一句话中:要将原始单位转换为上述物理单位, '和除以增益。


I am working on ECG signal processing using neural network which involves pattern recognition. As I need to collect all the data from Matlab to use it as test signal, I am finding it difficult to load it on to the Matlab. I am using MIT Arrhythmia database here.

The signal needs to be indexed and stored as data structure in Matlab compatible format. Presently, the signal is in .atr and .dat format.

How can you load MIT-BIH Arrhythmia database onto Matlab?

You can use physionet ATM to get .mat files which are easier to work with.

In the input part select the desired leads, length, database and sample.

In the toolbox select export as .mat:

Then download the '.mat' file,

In order to open the file in MATLAB, here is a sample code:

load ('100m.mat')          % the signal will be loaded to "val" matrix
val = (val - 1024)/200;    % you have to remove "base" and "gain"
ECGsignal = val(1,1:1000); % select the lead (Lead I)
Fs = 360;                  % sampling frequecy
t = (0:length(ECGsignal)-1)/Fs;  % time
plot(t,ECGsignal)

and you will get,

However, If you were to read annotation files for arrhythmia or QRS complexes that would be another problem.

Edit

The base and gain come from the info file (second picture). This file gives you various information regarding the ECG signal.

In the last sentence it says: To convert from raw units to the physical units shown above, subtract 'base' and divide by 'gain'.