How can i visualize ecg contain 12 leads in 12 different figures

4 views (last 30 days)
I have a .dat file and a .hea file which contains all 12 ecg leads.
i want to visualize each ecg lead in a different figure
I use the following code to store .dat data to a variable
fp= fopen('00001_lr.dat','rb');
ecg=fread(fp,'short');
frequency is 100hz and length is 10 secs and contain 12 leads (V1 to V6, I, II, III, aVR, aVL, and aVF )
thanks and regards.
  8 Comments
Kevin T
Kevin T on 30 Dec 2020
Hi, I have the same error when trying to read a local .dat file.
This is my matlab directory, my .dat file is located in F:\Open ECG file data.
Could you please help me solve this problem?
Star Strider
Star Strider on 30 Dec 2020
Kevin T —
I auggest that you post this as a new Question, and include a lot more detail, specifically uploading the ‘.dat’ file as an attachment.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 16 Oct 2020
This is the standard format for EKG record display:
EKGD = load('temp.mat');
EKG = EKGD.signal;
Leadc = {'I','II','III','aV_R','aV_L','aV_F','V_1','V_2','V_3','V_4','V_5','V_6'};
figure
kc = 1;
for k1 = 1:4
for k2 = 1:4:9
sbpt = (k1-1)+k2;
subplot(3,4,sbpt)
plot(EKG(1:300,kc))
title(Leadc{kc})
grid
ylim([-1 1])
kc = kc+1;
end
end
producing:
Characteristically, only three cycles are displayed, except for the separate Lead II rhythm strip (not shown here, would be a separate plot).
Diagnosis: Abnormal EKG, with pronounced left-axis deviation,with an axis of about -45°. Impression: Consistent with left bundle-branch block.
  4 Comments
Naveen F
Naveen F on 16 Oct 2020
Thank you very much Star Strider, your code work perfectly .. FSK thank you too for helping me configure the wfdb. you guys are great. keep up the good work :)
Star Strider
Star Strider on 16 Oct 2020
Naveen Fernando —
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

Sign in to comment.

More Answers (0)

Categories

Find more on Measurements and Feature Extraction in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!