Rank: 161772 based on 0 downloads (last 30 days) and 0 file submitted
photo

Cindy

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Cindy View all
Updated File Comments Rating
31 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson

Works great, thanks Brett!

31 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson

18 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson

Hi Brett,

I think I'm getting somewhere by only reading the necessary info (instead of all channel data) into tmpdata. I'm not sure if I'm getting the syntax of fread right though, specifically the SKIP argument. e.g. if I only want one channel (i.e. channel #k):

tmpdata(recnum).data{1} = fread(fid,hdr.samples(k),'int16',hdr.ns*2) * scalefac(k) + dc(k);

which doesn't quite work. I'm probably missing something...

17 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson

Thanks for this, very handy indeed.

As a previous poster has noted though, if you're only after specific channels, the code uses up a great deal of memory.

Replacing
for ii = 1:hdr.ns
with
for ii = 1:[1,3,5:7]

doesn't quite work at the point when tmpdata is being generated (where fread is used), nor does it reduce the size of the matrix being created. I run into Out of Memory problems at:

record = zeros(hdr.ns, hdr.samples(1)*hdr.records);

because tmpdata is already taking up too much memory space.

Any thoughts on overcoming these problems? I thought about deleting the irrelevant channels from tmpdata, but got a bit stuck with the syntax. Help would be appreciated!

Contact us