Code covered by the BSD License
04 May 2012
08 Jul 2013)
Read / Write EDF+-Files
Watch this File
Code to read and write EEG-edf+ files. I modified existing code to read simple edf-files for support of edf+ (including annotations)
This file inspired Block Edf Load and Block Edf Load Class.
Bug in line 134: Please move line 128 below the 128-130 if statement, as the statement will chance eventchannels and prevent a proper reshape due to size change.
Good work, but I find some bugs:
In lab_read_edf.m, lines 83-84: positions are repeated from line 82, thus mistaken. They should be (180:181) and (183:184), respectively.
In lab_read_edf.m, line 139:
data = reshape(data,hdr.numbersperrecord(1),hdr.channels,hdr.records);
I get an error. It is because the number of samples may be different in each record.
fixed some bugs in write_edf
Optimized read_edf to support scale and DC of data
updated read_edf to support misc 'number of records'
updated lab_read_edf to support again edf-files without annotations (broken since last update)
8.7.2013: corrected bug in lab_write_edf (thanks to Rune Paamand)