edfinfo
Description
Create an edfinfo
object to get information about a European
Data Format (EDF) or EDF+ file. edfinfo
objects contain information such
as file size, number of data records, number of signals, and number of samples.
Creation
Syntax
Description
Input Arguments
filename
— Name of EDF or EDF+ file
character vector | string scalar
Name of EDF or EDF+ file, specified as a character vector or string scalar.
Depending on the location of the file, filename
can take one of
these forms.
Location | Form |
---|---|
Current folder or folder on the MATLAB® path | Specify the name of the file in
Example:
|
File in a folder | If the file is not in the current folder or in a folder on the MATLAB path, then specify the full or relative path name. Example:
Example:
|
Note
edfinfo
does not support EyeLink® EDF files.
Data Types: char
| string
Properties
File Properties
Filename
— File name
string scalar
This property is read-only.
File name, returned as a string scalar.
Example: "ecg_20200411_120.edf"
Data Types: string
FileModDate
— Date last modified
string scalar
This property is read-only.
Date last modified, returned as a string scalar with the date and time the file was last modified.
Example: "11-Apr-2020 15:38:37"
FileSize
— File size in bytes
integer scalar
This property is read-only.
File size in bytes, returned as an integer scalar.
Example: 4040992
Data Types: double
Header Properties
Version
— Data format version
"0"
This property is read-only.
Data format version, returned as "0"
.
Data Types: string
Patient
— Patient identification details
string scalar
This property is read-only.
Patient identification details, returned as a string scalar. Patient identification details
can include Patient ID, sex or gender, birth date in 'dd-MMM-yyyy'
format, and name.
Example: "X F X 120 04-JUL-1982"
Data Types: string
Recording
— Recording identification details
string scalar
This property is read-only.
Recording identification details, returned as a string scalar. Recording identification details may include its start date and time, the ID of the technician that made the recording, and the ID of the equipment that made the recording.
Example: "Startdate 04-JUL-1982 X X X"
Data Types: string
StartDate
— Recording start date
string scalar
This property is read-only.
Recording start date, returned as a string scalar in 'dd.MM.yy'
format.
Example: "04.07.82"
Data Types: string
StartTime
— Recording start time
string scalar
This property is read-only.
Recording start time, returned as a string scalar in 'HH.mm.ss'
format.
Example: "17.16.37"
Data Types: string
HeaderBytes
— Header size in bytes
integer scalar
This property is read-only.
Header size in bytes, returned as an integer scalar. HeaderBytes
is given by (256 + NumSignals
× 256) bytes. The first 256 bytes correspond to a static header and are required for all EDF and EDF+ files. The other bytes depend on the number of signals present in the data records.
Example: 2048
Data Types: double
Reserved
— EDF+ interruption information
"EDF+C"
| "EDF+D"
| ""
This property is read-only.
EDF+ interruption information, returned as "EDF+C"
or "EDF+D"
for EDF+ compliant files.
"EDF+C"
— The recording is continuous: There are no interruptions and all data records are contiguous, such that the start time of each data record coincides with the start time of the previous record plus its duration."EDF+D"
— The recording is discontinuous with interruptions between consecutive data records.
For files that are not EDF+ compliant, this property is an empty string (""
).
Data Types: string
NumDataRecords
— Number of data records in file
integer scalar
This property is read-only.
Number of data records in file, returned as an integer scalar.
Note
If filename
is not EDF compliant,
NumDataRecords
can be set to -1
when the
number of data records is unknown. If filename
is EDF
compliant, NumDataRecords
must be set to a positive integer. If
filename
has Reserved
set to a
nonempty string and NumDataRecords
set to
-1
, edfinfo
throws an error.
Data Types: double
DataRecordDuration
— Duration of each data record
duration scalar
This property is read-only.
Duration of each data record, returned as a duration scalar.
Data Types: duration
NumSignals
— Number of signals in file
integer scalar
This property is read-only.
Number of signals in file, returned as an integer scalar.
Data Types: double
Signal Record Properties
SignalLabels
— Signal names
string vector
This property is read-only.
Signal names, returned as a string vector of length NumSignals
.
["Thorax 1";"Abdomen 3"]
Data Types: string
TransducerTypes
— Transducer details
string vector
This property is read-only.
Transducer details, returned as a string vector of length NumSignals
. Each element of TransducerTypes
contains details about the transducer used to obtain the corresponding signal in SignalLabels
.
Example: ["AgAgCl electrodes";"thermistor"]
Data Types: string
PhysicalDimensions
— Signal data units
string vector
This property is read-only.
Signal data units, returned as a string vector of length NumSignals
. Each element of PhysicalDimensions
contains the measurement units used to express the values of the corresponding signal in SignalLabels
.
Example: ["uV";"mV"]
Data Types: string
PhysicalMin
— Signal minimum physical value
numeric vector
This property is read-only.
Signal minimum physical value, returned as a numeric vector of length NumSignals
. Each element of PhysicalMin
contains the minimum physical value of the corresponding signal in SignalLabels
.
Data Types: double
PhysicalMax
— Signal maximum physical value
numeric vector
This property is read-only.
Signal maximum physical value, returned as a numeric vector of length NumSignals
. Each element of PhysicalMax
contains the maximum physical value of the corresponding signal in SignalLabels
.
Data Types: double
DigitalMin
— Signal minimum digital value
numeric vector
This property is read-only.
Signal minimum digital value, returned as a numeric vector of length NumSignals
. Each element of DigitalMin
contains the minimum digital value of the corresponding signal in SignalLabels
.
Data Types: double
DigitalMax
— Signal maximum digital value
numeric vector
This property is read-only.
Signal maximum digital value, returned as a numeric vector of length NumSignals
. Each element of DigitalMax
contains the maximum digital value of the corresponding signal in SignalLabels
.
Data Types: double
NumSamples
— Number of samples in signal
numeric vector
This property is read-only.
Number of samples in signal, returned as a numeric vector of length NumSignals
. Each element of NumSamples
contains the number of samples in the corresponding signal in SignalLabels
.
Data Types: double
Prefilter
— Signal data units
string vector
This property is read-only.
Signal data units, returned as a string vector of length NumSignals
. Each element of Prefilter
contains details about the filters, if any, used to preprocess the corresponding signal in SignalLabels
.
Example: ["HP:10Hz LP:80Hz N:60Hz";"HP:0.1Hz LP:90Hz N:60Hz"]
Data Types: string
SignalReserved
— Additional signal information
string vector
This property is read-only.
Additional signal information, returned as a string vector of length NumSignals
. Each element of SignalReserved
contains additional information, if any, about the corresponding signal in SignalLabels
.
Data Types: string
Annotations
— Annotations present in signal records
timetable
This property is read-only.
Annotations present in signal records, returned as a timetable containing these variables:
Onset
— Time at which the annotation occurred, expressed as a duration indicating the number of seconds elapsed since the start time of the file.Annotations
— A string that contains the annotation text.Duration
— A duration scalar that indicates the duration of the event described by the annotation. If the file does not specify an annotation duration, this variable is returned asNaN
.
Data Types: table
Examples
Get Information About EDF File
Use the edfinfo
function to create an edfinfo
object containing information about the file example.edf
.
info = edfinfo('example.edf')
info = edfinfo with properties: Filename: "example.edf" FileModDate: "30-Oct-2020 12:27:26" FileSize: 31488 Version: "0" Patient: "Patient 7" Recording: "Startdate not recorded" StartDate: "10.10.20" StartTime: "12.02.18" HeaderBytes: 768 Reserved: "" NumDataRecords: 6 DataRecordDuration: 10 sec NumSignals: 2 SignalLabels: [2x1 string] TransducerTypes: [2x1 string] PhysicalDimensions: [2x1 string] PhysicalMin: [2x1 double] PhysicalMax: [2x1 double] DigitalMin: [2x1 double] DigitalMax: [2x1 double] Prefilter: [2x1 string] NumSamples: [2x1 double] SignalReserved: [2x1 string] Annotations: [0x2 timetable]
Display this information about the second signal in the file:
Its name
The physical units in which the data is expressed
The minimum and maximum physical values of the data
The number of samples it contains
nsig = 2; disp([info.SignalLabels(nsig) ... info.PhysicalDimensions(nsig) ... info.PhysicalMin(nsig) ... info.PhysicalMax(nsig) ... info.NumSamples(nsig)]')
"ECG2" "mV" "-229.048" "229.041" "1280"
Tips
You can convert an edfinfo
object to a MATLAB structure using the get
function. For
example:
info = edfinfo('example.edf');
strc = get(info)
References
[1] Kemp, Bob, Alpo Värri, Agostinho C. Rosa, Kim D. Nielsen, and John Gade. “A Simple Format for Exchange of Digitized Polygraphic Recordings.” Electroencephalography and Clinical Neurophysiology 82, no. 5 (May 1992): 391–93. https://doi.org/10.1016/0013-4694(92)90009-7.
[2] Kemp, Bob, and Jesus Olivan. "European Data Format 'plus' (EDF+), an EDF Alike Standard Format for the Exchange of Physiological Data." Clinical Neurophysiology 114, no. 9 (2003): 1755–1761. https://doi.org/10.1016/S1388-2457(03)00123-8.
Version History
Introduced in R2020b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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
- United Kingdom (English)