- Go to: http://www.physionet.org/cgi-bin/atm/ATM;
- Select the database and record as shown in the screencap (the Annotations and the rest are my choice, change them to meet your requirements) but be sure to select ‘Export signals as .mat’, (the rest proceeds automatically);
- Scroll down and right-click on each of the three files it creates in turn ( 04015m.mat, 04015m.info, and 04015m.hea ) and save them to the appropriate directory in your MATLAB path (assumes Windows, if you have another OS do what it requires to save them).
- I was then able to load both signals with this code (change the variable names to your liking) and then plotted them to be sure they imported correctly:
How to read file '04015.dat','04015.atr' and '04015.qrs' of MIT BIH AF Database(PHYSIONET)
20 views (last 30 days)
Show older comments
By using the rddta.m file i can read the ecg signal from mit bih arrhythmia database.But in mit bih AF data base there are two ecg signals in a single dat file.but i badly need to read data from those files.So can any one please give me a code or suggest me how can i modify the rddta.m to read data from mit bih AF database.
0 Comments
Accepted Answer
Star Strider
on 2 Sep 2014
It took me a bit to figure this out, because I don’t use Physionet that frequently. I successfully downloaded that file and related files a few minutes ago.
This is what you need to do:
EKG04015 = load('04015m.mat');
EKG_1 = EKG04015.val(1,:);
EKG_2 = EKG04015.val(2,:);
The Physionet screencap:
Do that, and you should be good to go!
The .mat-file is 3.1 MB or I’d upload it and the others here to save you the bother.
3 Comments
Star Strider
on 10 Jan 2015
I’ve not used Physionet often, and have not used the Annotations.
If you’re just looking at the rhythm (the way AF is diagnosed), it should be ‘irregularly irregular’ (to use the clinical term). The morphology of the QRS complexes will vary because hearts exhibiting AF are by definition unhealthy hearts, but if you’re considering only rhythm, those are unimportant. (It is very difficult to determine anything other than rhythm in an AF EKG.)
If you can attach an ‘annotation file’ (or a representative sample from it), I’ll take a look at it and see if I can suggest a way to import it into MATLAB. What specifically do you want from it?
Explorer
on 21 Apr 2015
This was all about plotting ECG signal saved in dataset. But how to view annotations and headers?
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!