[Edit: Add a citation of, and link to, the original Kors paper. The data and matrix and code are unchanged.]
The Kors conversion matrix is a 12x3 matrix that converts a 12 lead EKG to the three components (X,Y,Z) of the vector cardiogram. It is
A=[ 0.38,-0.07, 0.11; -0.07, 0.93,-0.23; 0 , 0 , 0 ;...
0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ;...
-0.13, 0.06,-0.43; 0.05,-0.02,-0.06; -0.01,-0.05,-0.14;...
0.14, 0.06,-0.20; 0.06,-0.17,-0.11; 0.54, 0.13, 0.31];
I, II, III, aVR, aVL, aVF, V1, V2, V3, V4, V5, V6.
The zeros in matrix A reflect the fact that leads III and aVR, aVL, aVF are not used by Kors.
ekg12=load('ecg12leadData.txt');
t=(0:length(ekg12)-1)/500;
Plot leads I, II, III of the 12 lead EKG:
subplot(311), plot(t,ekg12(:,1),'-k')
subplot(312), plot(t,ekg12(:,2),'-k')
title('Lead II'); grid on
subplot(313), plot(t,ekg12(:,3),'-k')
title('Lead III'); grid on; xlabel('Time (s)')
Plot leads X, Y, Z of the vector cardiogram:
subplot(311), plot(t,ekgV(:,1),'-r')
subplot(312), plot(t,ekgV(:,2),'-g')
subplot(313), plot(t,ekgV(:,3),'-b')
title('Z'); grid on; xlabel('Time (s)')
Save the vector cardiogram data with
which is commented out here, since it will not run in this online platform.
I will discuss the QRS area calculation in a comment.