Data Organization in ECG Analysis: Separate Leads or Individual Si... (2024)

24 Ansichten (letzte 30 Tage)

Ältere Kommentare anzeigen

rawaa mejri vor etwa 10 Stunden

  • Verknüpfen

    Direkter Link zu dieser Frage

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals

  • Verknüpfen

    Direkter Link zu dieser Frage

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals

Kommentiert: Star Strider vor etwa 3 Stunden

Dear Matlab Community,

I am currently in the process of planning data organization for an ECG analysis using the PTB-XL dataset, and I would like to seek your advice and expertise on a specific question.

When it comes to data organization, is it recommended to use each lead separately (12 leads --> 12 columns)? Or would it be preferable to adopt an approach where each row represents a distinct ECG signal?

I would greatly appreciate insights and recommendations from those who have experience in this area.

Thank you very much for your valuable contribution.

Best regards,

0 Kommentare

-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Melden Sie sich an, um diese Frage zu beantworten.

Antworten (1)

Star Strider vor etwa 7 Stunden

  • Verknüpfen

    Direkter Link zu dieser Antwort

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#answer_1463331

  • Verknüpfen

    Direkter Link zu dieser Antwort

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#answer_1463331

I am not certain what you want to do, or what question you are asking. In general, EKG data are analysed column-wise, with a time vector (generally beginning at zero with regular sampling intervals and a sampling frequency at least 256 Hz and 1 kHz if possible) for the first column, and each lead being successive columns, ordered characteristically as Data Organization in ECG Analysis: Separate Leads or Individual Si... (3) . This also is the way MATLAB data matrices in general are organised.

10 Kommentare

8 ältere Kommentare anzeigen8 ältere Kommentare ausblenden

rawaa mejri vor etwa 7 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171671

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171671

Thank you for your response @Star Strider ,

To clarify, Do we use a single temporal vector for all (one column only), or do we create a temporal vector for each lead? For instance, for lead I, do we have a column called time_I (12 leads -> 12 temporal vectors)? Is that correct? Or do we have a single temporal vector (one column only) for all 12 leads (12 columns)?

Star Strider vor etwa 6 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171691

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171691

My pleasure!

I’m not sure what you mean by ‘temporal vector’. There is characteristically one time vector in the first column, and each corresponding EKG lead in columns 2-13 (2-14 if Data Organization in ECG Analysis: Separate Leads or Individual Si... (6) is included). All the leads are collected and recorded at the same times, those times given in the first-column time vector.

Collectting them serially is not appropriate, because natural variations in heart rate in a normal, healthy heart make the serial records ininterpretable when aggregated. They must all be collected and recorded at the same times.

rawaa mejri vor etwa 6 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171696

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171696

Thanks a lot for your help !

I understand! Just one last question: in the PTB-XL dataset, I have a .dat file and a .hea file. I suppose I should use the .hea file to extract the leads. Regarding the time vector, should I generate it based on the sampling frequency provided?

Star Strider vor etwa 6 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171721

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171721

In MATLAB Online öffnen

My pleasure!

I am not familiar with that dataset. If you do not already have a time vector provided with it, you can create one using the linspace function —

EKG = rand(10,12); % EKG Data

Fs = 256; % Sampling Frequency

Time = linspace(0, size(EKG,1)-1, size(EKG,1)).'/Fs; % Synthetic Time Vector

EKG_Matrix = [Time EKG]

EKG_Matrix = 10x13

0 0.4856 0.4760 0.7745 0.4151 0.9988 0.3865 0.1495 0.0096 0.3425 0.5348 0.8598 0.7829 0.0039 0.2463 0.4456 0.8281 0.5107 0.2525 0.9103 0.6471 0.9814 0.8694 0.4492 0.7721 0.6395 0.0078 0.0309 0.3216 0.8742 0.5227 0.1697 0.0887 0.3554 0.8075 0.9444 0.6633 0.4132 0.8197 0.0117 0.8595 0.4542 0.1945 0.4590 0.8822 0.3897 0.8010 0.4530 0.7423 0.4072 0.3338 0.5004 0.0156 0.6430 0.4124 0.0590 0.6767 0.2136 0.2213 0.6985 0.4550 0.9520 0.1370 0.3643 0.0842 0.0195 0.2821 0.6850 0.2601 0.8432 0.0871 0.4847 0.4177 0.0077 0.2032 0.9331 0.3941 0.1442 0.0234 0.8091 0.6667 0.7804 0.9966 0.2299 0.6895 0.8777 0.4294 0.6993 0.5283 0.4722 0.7945 0.0273 0.3704 0.8445 0.5042 0.5735 0.3571 0.5817 0.5753 0.2384 0.2834 0.7878 0.5440 0.5434 0.0312 0.7034 0.0919 0.8106 0.9310 0.7157 0.6494 0.4306 0.1360 0.6325 0.9629 0.2411 0.9952 0.0352 0.4809 0.0332 0.9774 0.0175 0.4227 0.0604 0.3911 0.7998 0.9508 0.4208 0.3304 0.4006

<mw-icon class=""></mw-icon>

<mw-icon class=""></mw-icon>

figure

plot(EKG_Matrix(:,1), EKG_Matrix(:,2:end)+[1:size(EKG_Matrix,2)-1]*2)

grid

ylim('padded')

xlabel('Time')

legend(compose('Lead %s',["I","II","III","aV_R","aV_L","aV_F","V_1","V_2","V_3","V_4","V_5","V_6"]), 'Location','eastoutside')

Data Organization in ECG Analysis: Separate Leads or Individual Si... (9)

.

rawaa mejri vor etwa 5 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171741

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171741

Thank you again for your invaluable assistance. Following your recommendations, I have selected the first example and tried it out. Here are the signals; based on your experience, are they correct? Here are the data in the file .hea:

00001_lr 12 100 1000

00001_lr.dat 16 1000.0(0)/mV 16 0 -119 1508 0 I

00001_lr.dat 16 1000.0(0)/mV 16 0 -55 723 0 II

00001_lr.dat 16 1000.0(0)/mV 16 0 64 64758 0 III

00001_lr.dat 16 1000.0(0)/mV 16 0 86 64423 0 AVR

00001_lr.dat 16 1000.0(0)/mV 16 0 -91 1211 0 AVL

00001_lr.dat 16 1000.0(0)/mV 16 0 4 7 0 AVF

00001_lr.dat 16 1000.0(0)/mV 16 0 -69 63827 0 V1

00001_lr.dat 16 1000.0(0)/mV 16 0 -31 6999 0 V2

00001_lr.dat 16 1000.0(0)/mV 16 0 0 63759 0 V3

00001_lr.dat 16 1000.0(0)/mV 16 0 -26 61447 0 V4

00001_lr.dat 16 1000.0(0)/mV 16 0 -39 64979 0 V5

00001_lr.dat 16 1000.0(0)/mV 16 0 -79 832 0 V6

here the first rows of data :

Data Organization in ECG Analysis: Separate Leads or Individual Si... (11)

rawaa mejri vor etwa 5 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171746

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171746

here are the ecg signal , leads :

Data Organization in ECG Analysis: Separate Leads or Individual Si... (13)

Data Organization in ECG Analysis: Separate Leads or Individual Si... (14)

rawaa mejri vor etwa 5 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171751

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171751

@Star Strider Thanks a lot

Star Strider vor etwa 4 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171806

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171806

In MATLAB Online öffnen

My pleasure!

That appears to be correct, and the timing appears to be approppriate (about 66 bpm).

The only change I would make is the order of the plots. The most common arrangement is something like this —

EKG = rand(100,12); % EKG Data

Fs = 256; % Sampling Frequency

Time = linspace(0, size(EKG,1)-1, size(EKG,1)).'/Fs; % Synthetic Time Vector

EKG_Matrix = [Time EKG];

Leads = ["I","II","III","aV_R","aV_L","aV_F","V_1","V_2","V_3","V_4","V_5","V_6"];

figure

tiledlayout(6,2)

for k = 1:6

nexttile(2*k-1)

plot(EKG_Matrix(:,1), EKG_Matrix(:,k+1))

grid

title(Leads(k))

end

for k = 1:6

nexttile(2*k)

plot(EKG_Matrix(:,1), EKG_Matrix(:,k+6))

grid

title(Leads(k+6))

end

Data Organization in ECG Analysis: Separate Leads or Individual Si... (17)

Another common format —

figure

tiledlayout(3,4)

for k = 1:3

nexttile(4*k-3)

plot(EKG_Matrix(:,1), EKG_Matrix(:,k+1))

grid

title(Leads(k))

end

for k = 1:3

nexttile(4*k-2)

plot(EKG_Matrix(:,1), EKG_Matrix(:,k+4))

grid

title(Leads(k+3))

end

for k = 1:3

nexttile(4*k-1)

plot(EKG_Matrix(:,1), EKG_Matrix(:,k+7))

grid

title(Leads(k+6))

end

for k = 1:3

nexttile(4*k)

plot(EKG_Matrix(:,1), EKG_Matrix(:,k+10))

grid

title(Leads(k+9))

end

Data Organization in ECG Analysis: Separate Leads or Individual Si... (18)

That would actually look corect if I had your data to plot.

.

rawaa mejri vor etwa 3 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171831

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171831

Thanks a lot for your help !

Star Strider vor etwa 3 Stunden

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171836

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2122541-data-organization-in-ecg-analysis-separate-leads-or-individual-signals#comment_3171836

My pleasure!

Melden Sie sich an, um zu kommentieren.

Melden Sie sich an, um diese Frage zu beantworten.

Siehe auch

Tags

  • signal processing
  • ptb-xl dataset
  • data organization
  • ecg
  • leads

Community Treasure Hunt

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

Start Hunting!

Es ist ein Fehler aufgetreten

Da Änderungen an der Seite vorgenommen wurden, kann diese Aktion nicht abgeschlossen werden. Laden Sie die Seite neu, um sie im aktualisierten Zustand anzuzeigen.


Translated by Data Organization in ECG Analysis: Separate Leads or Individual Si... (21)

Data Organization in ECG Analysis: Separate Leads or Individual Si... (22)

Website auswählen

Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .

Sie können auch eine Website aus der folgenden Liste auswählen:

Amerika

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europa

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asien-Pazifik

Kontakt zu Ihrer lokalen Niederlassung

Data Organization in ECG Analysis: Separate Leads or Individual Si... (2024)

FAQs

What are the 7 steps to interpret an ECG? ›

7 step approach to ECG rhythm analysis
  • Rate. Tachycardia or bradycardia? ...
  • Pattern of QRS complexes. Regular or irregular? ...
  • QRS morphology. Narrow complex: sinus, atrial or junctional origin. ...
  • P waves. ...
  • Relationship between P waves and QRS complexes. ...
  • Onset and termination. ...
  • Response to vagal manoeuvres.
Jun 1, 2023

What software is used to Analyse ECG? ›

Easy-to-use software

Cardiomatics offers an intuitive interface and easy-to-read ECG reports. Our solution is a truly device-independent for arrhythmia diagnostics, compatible with more than 40 common ECG recording devices models.

How do you read an ECG dataset? ›

The ECG dataset has 4998 examples with 140-time points and 1 target variable. Each row represents an ECG signal, and the values in the columns are the voltage levels at each time point. The last column is the target variable with two values: 1 for normal ECG and 0 for aberrant ECG.

What are the 8 steps needed to analyze an EKG? ›

For this course, we will introduce eight steps:
  • Rhythm.
  • Rate.
  • P Wave.
  • PR Interval.
  • QRS Duration.
  • T Wave.
  • QT Interval.
  • ST Segment.

What type of data is ECG? ›

An electrocardiogram (ECG or EKG) is a quick test to check the heartbeat. It records the electrical signals in the heart. Test results can help diagnose heart attacks and irregular heartbeats, called arrhythmias. ECG machines can be found in medical offices, hospitals, operating rooms and ambulances.

What algorithm is used for ECG? ›

One of technique of the detection of the QRS, T and P waves is Pan-Tompkins algorithm. The algorithm uses some of the basic techniques that are common in many pattern recognition systems. The ECG signal is first reduced into a set of predefined tokens, which represent certain shapes of the ECG waveform [2].

Which computer is used in ECG? ›

Hybrid computers are used in hospitals to measure the heartbeat of patients. They have the features of both analog and digital computers.

How do you read an ECG in 10 steps? ›

Outline
  1. Step 1: Rate.
  2. Step 2: Rhythm.
  3. Step 3: Axis.
  4. Step 4: Intervals.
  5. Step 5: P wave.
  6. Step 6: QRS complex.
  7. Step 7: ST segment-T wave.
  8. Step 8: Overall interpretation.
Aug 31, 2023

What is a 7 lead ECG? ›

ECG 7-Leads

Excellent accuracy in detecting cardiac arrhythmias, thanks to seven ECG leads – excellent P-wave, QRS beat morphology and ultra-low noise ECG.

References

Top Articles
Latest Posts
Article information

Author: Eusebia Nader

Last Updated:

Views: 6429

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Eusebia Nader

Birthday: 1994-11-11

Address: Apt. 721 977 Ebert Meadows, Jereville, GA 73618-6603

Phone: +2316203969400

Job: International Farming Consultant

Hobby: Reading, Photography, Shooting, Singing, Magic, Kayaking, Mushroom hunting

Introduction: My name is Eusebia Nader, I am a encouraging, brainy, lively, nice, famous, healthy, clever person who loves writing and wants to share my knowledge and understanding with you.