For scientists that want to perform analysises that are not provided directly by medilog Darwin, exporting the data into Matlab format often solves the problem. Darwin exports the data in Matlab V4.0 file format. Users that don't have (or don't want to buy) Matlab, can use Octave instead, which is a compatible freeware alternative.

Available values

A Matlab file that has been generated using medilog Darwin may contain the following variables:

List of possible variables:

Name Type Description
Name Char array (String) Patient name
PatientBirthday Double array d.m.yyyy == birthday
RecDuration Double array hh.mm.ss == length of recording
Starttime Double array d.m.yyyy - hh.mm.ss date and starttime of recording
ECG_1 ... ECG_x Double array ECG data of channel 1..x
ECG_?_SRate Double array Recording rate of channel ? (1,2,3...)
XYZ_1 ... XYZ_3 Double array Accelerometer data X (1), Y (2), Z (3)
apnoe 2 dimensional double array Begin and length of a potential apnoea in seconds
beatpos Double array Position of detected beats in seconds (ATT: also artefacts and inhibitions)
beats Double array Beat type of every detected beat
index Double array Uncorrected (unedited) beat positions in seconds
key Double array Positions of key events in seconds
noise Double array ECG signal noise level
resp Double array EDR signal (ECG derived respiration)

Values of Matlab variable 'beats':

Type Value
UNDEFINED 1
SUPRAVENTRICULAR 2
VENTRICULAR 3
ATRIAL_PACED 4
VETRICULAR_PACED 5
DUAL_CHAMBER_PACED 6
BUNDLE_BRANCH_BLOCK 7
JUNCTIONAL 8
FUSION 9
ARTEFACT 10
USER_DEFINED 64 and above

The availability of some variables depends on the used recorder type and recorder configuration (e.g. the variable ‘resp’ is only available when the recording has been done with a medilog AR12plus recorder).

Configure which data to export 

To configure which data to export, select the recording(s) in the database browser, click Export and switch to the Matlab tab. If you now click on "...more...", a text editor opens. Here you can configure what to export. Lines with a semicolon (";") in front are deactivated. Remove the semicolon to activate such a line.

In most of the cases it is not necessary to export the ECG signals. As exporting the ECG data would result in VERY large data files, the export is disabled by the semicolon before the line "ECG[*]=*". Let's say you want to export the 1st ECG channel. Remove the semicolon before the line "ECG[1]=*". When you now generate a Matlab-format it will also contain the ECG-data of channel 1.

 

Quickstart in Matlab

  • load e:\Temp\MyTestfile.mat
  • whos % lists available values/signals
  • Starttime % shows starttime-array
  • ECG_1_SRate
  • plot(ECG_1) % display ECG-signal
  • ShortECG=ECG_1(1:200) % get a short portion of the long signal
  • ShortECG=shiftdim(ShortECG, 1) % rotate the values-matrix, so that values are stored in separate lines instead of columns
  • csvwrite('e:\out.csv', ShortECG) % export data to csv-file
  • clear % Clear memory
  • Load ...

See also Matlab Open Data