File Exchange

image thumbnail


version (8.64 KB) by Matt Fifer
This is a modification of the "edfread" submission, modified to be faster with less options.


Updated 02 Jul 2014

View License

This is a modification of the File Exchange submission "edfread" for importing an EDF file into MATLAB. I removed a few options which enable import of large files to occur much, much faster in the case of 1-sample records or records containing all of the samples at once.
[hdr, dataMat] = edfread2(fname)

Reads data from ALL RECORDS of file fname ('*.edf'). Header information is returned in structure hdr, and the signals (waveforms) are returned in dataMat, which is either a (samples x channels) matrix, or a (1 x channels) cell array full of (samples x 1) arrays IF there are different numbers of samples in each channel.

Comments and Ratings (2)

fasil ok

Hai Matt
I got an error in the following line

writeIndices{chans} = writeIndices{chans} + hdr.samples

Error using +
Matrix dimensions must agree.


Hi Matt

I met the error as follows:
Subscript indices must either be real positive integers or logicals.

Error in edfread (line 122)
hdr.label{ii} = regexprep(fread(fid,32,'*char')','\W','');

I record the EDF file with Eyelink, a eye tracing system.

Do you have any solution?


changed title

changed formatting of description (last time hopefully)

Changed formatting of description.

Changed formatting of Description.

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: edfRead