Rank: 3760 based on 25 downloads (last 30 days) and 2 files submitted
photo

fhz

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by fhz View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
07 Jul 2014 Read / Write EDF+-Files Read / Write EDF+-Files Author: fhz eeg edf 19 3
  • 3.0
3.0 | 1 rating
08 Jul 2013 Screenshot table_dialog Script for table input Author: fhz table, data import 6 0
Comments and Ratings on fhz 's Files View all
Updated File Comment by Comments Rating
14 Oct 2014 Read / Write EDF+-Files Read / Write EDF+-Files Author: fhz Gil Fuchs

Hi,

I modified the write function for using the full range of values for each signals.

Before the physical max & min were the same for all signals and set to the highest and lowest values.
Now these values are determined for each signal, separately, and data is expanded or shrank to cover the full range of values.

Replace the lines 81-104 of lab_write_edf with :
% Scale and convert to in16 (data)

% Rounds max-min to the highest nearest int
% Works for most of the cases, but we should consider using scientific
% notation for very little values
maxV = ceil(max(data, [], 2));
minV = floor(min(data, [], 2));

% Physical max can't be equal to physical min
eqInd = find(maxV == minV);
maxV(eqInd) = maxV(eqInd) + 1;

maxVc = repmat(32767,size(data,1),1);
minVc = repmat(-32767,size(data,1),1);

Scale = (maxV - minV) ./ (maxVc - minVc);
offset = maxV - (Scale .*maxVc);

data = data - repmat(offset, 1, size(data,2));
data = bsxfun(@rdivide, data, Scale);
data = int16(data);

clearvars Scale offset

Thank you for your work.

08 Jul 2013 Read / Write EDF+-Files Read / Write EDF+-Files Author: fhz Rune Paamand

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.

29 May 2012 Read / Write EDF+-Files Read / Write EDF+-Files Author: fhz Jesús Lucio

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.

Contact us