Load MIT-BIH Arrhythmia ECG database onto MATLAB

后端 未结 6 1116
情书的邮戳
情书的邮戳 2020-12-13 20:58

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

6条回答
  •  借酒劲吻你
    2020-12-13 21:50

    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:

    enter image description here

    Then download the '.mat' file,

    enter image description here

    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,

    enter image description here

    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.

    enter image description here

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

提交回复
热议问题