Plot 12-leads ECG signal in one figure
Show older comments
Hello,
How to plot 12-leads ECG signal in one figure?
The ECG data are included in the structure:
% Create a structure to hold the ECG data
N = size(rawData,1)
ecgData = struct();
ecg = struct();
% Therefore
ecgData.leadI=rawData(:,2);
ecgData.leadII=rawData(:,3);
% The augmented vector leads and lead III are derived as
% III=II-I; aVR=-(I+II)/2; aVL=I-II/2; aVF=II-I/2
ecgData.leadIII=ecgData.leadII-ecgData.leadI;
ecgData.aVR=-(ecgData.leadI+ecgData.leadII)/2;
ecgData.aVL=ecgData.leadII/2;
ecgData.aVF=ecgData.leadII-ecgData.leadI/2;
ecgData.V1 = rawData(:,8);
ecgData.V2 = rawData(:,4);
ecgData.V3 = rawData(:,5);
ecgData.V4 = rawData(:,6);
ecgData.V5 = rawData(:,7);
ecgData.V6 = rawData(:,1);
Answers (1)
Taylor
on 13 Nov 2024
0 votes
1 Comment
To use the commonly-accepted plot format for a 12-lead EKG —
EKG = rand(12, 30)
t = linspace(0, 3, 30);
figure
Leads = ["I" "II" "III" "aV_"+["R" "L" "F"] "V_"+(1:6)];
tiledlayout(3, 4, TileIndexing='columnmajor')
for k = 1:12
nexttile
plot(t, EKG(k,:))
grid
title(Leads(k))
end
.
Categories
Find more on Scopes and Data Logging 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!