top of page

How to Export an ECG Channel to a Txt File

Steps
  1. Open EEGLAB in MatLab (type “eeglab” in MatLab and hit enter)

  2. In EEGLAB, go to “file” -> “import” -> “using EEGLAB functions and plugins” -> “import Phillips .mff file”

  3. Select the mff file of the ECG recording you want to import

  4. For trigger/event type select “code”

  5. Go to “plot” -> “channel data (scroll)” and check to see what channel number corresponds to the ECG channel (usually channel 66). You should be looking for a QRS wave signal

  6. Go to “edit” -> “select data” and enter the ECG channel number into “channel range”

  7. Save the new data set

  8. Confirm the right channels were removed by navigating to “plot” -> “channel data (scroll)”

  9. Then go to “file” -> “export” -> “data and ica activity to text file”

  10. Make sure the only boxes checked are “transpose matrix (elec -> cols)” and “use comma separator (csv) instead of tabs”. All other boxes should be unchecked.

  11. Enter the file name with a proper title (should end in .txt) and select the proper folder destination

  12. Wait until the file is finished uploading before closing MatLab

Tutorial

How to export an ECG channel to a .txt file in MatLab

bottom of page