Neuroscan file close bug (Was: Data concatination)

Durk Talsma d.talsma at PSY.VU.NL
Tue Oct 11 10:29:16 CEST 2005


Okay, just to follow up on my own message: The skeleton code below, led
to a "Too many files open" error after preprocessing four subjects,
causing any I/O functions of MATLAB to freeze:

After some debugging, I found that in the file
private/read_neuroscan_cnt.m the read function returns when headeronly
is given as an argument, without closing the filehandle first.

Attached is a fix.

Cheers,
Durk

Durk Talsma wrote:

> Hi Everybody,
>
> I have a question regarding the following: I would like to run a
> time/frequency analysis on some EEG data we collected. The data is
> collected over short 5-min runs, and each run is saved into a separate
> datafile (neuroscan.cnt format). So what I would like to try to do is
> the following (in pseudo code):
>
> for subj=1:12
>   for run =i:10
>       cfg.dataset = [subj run].cnt
>       data(run) = preprocessing(cfg);
>   end
>   datacat  = concatenate data(1:10)
>   datafreq = freqanalysis(cfg, datacat)
> end
>
> Is there a way to do this?
>
> Thanks,
> Durk
>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: read_ns_cnt.m
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20051011/5db04954/attachment-0001.ksh>


More information about the fieldtrip mailing list