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.