Updated Wed, 05 Aug 2020 19:08:39 +0000
Editor's Note: This file was selected as MATLAB Central Pick of the Week
The edfRead() functionality in this submission is now officially provided by the Signal Processing Toolbox as of R2020b. This File Exchange submission is no longer supported
Read European Data Format file into MATLAB
[hdr, record] = edfread(fname)
Reads data from ALL RECORDS of file fname ('*.edf'). Header information is returned in structure hdr, and the signals (waveforms) are returned in structure record, with waveforms associated with the records returned as fields titled 'data' of structure record.
NOTE: Support for this function is being deprecated. Please see:
[...] = edfread(fname, 'assignToVariables', assignToVariables)
Triggers writing of individual output variables, as defined by field 'labels', into the caller workspace.
[...] = edfread(fname, 'targetSignals', targetSignals,...)
Allows the user to specify by name or index the subset of signals to import.
PLEASE NOTE: I have also uploaded on the File Exchange EDFReadUntilDone. If you have problems reading large files with EDFRead, please download and try that one!
FORMAT SPEC: Source: http://www.edfplus.info/specs/edf.html
Brett Shoelson (2023). edfRead (https://www.mathworks.com/matlabcentral/fileexchange/31900-edfread), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
- MATLAB > Data Import and Analysis >
- AI, Data Science, and Statistics > Deep Learning Toolbox > Image Data Workflows > Pattern Recognition and Classification >
- Sciences > Neuroscience > Human Brain Mapping > EEG/MEG/ECoG >
Inspired: Read Persyst lay-dat files, edfreadUntilDone(fname, varargin), blockEdfLoad, blockEDFLoadClass, edfread2
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Added mention of the blog about edfread in the Signal Processing Toolbox.
Same bug fix in name of file.
Minor bug fix in name of file.
Fixed a problem triggered by the license conversion on Sept.1, 2016.
Enabled the import of a user-specified subset of signals. Also fixed a problem when signal labels include spaces or difficult-to-interpret characters.
Fixes a problem with incorrect reading of variable-length signals.