[FieldTrip] Problem in importing BVA file

isabella premoli isabella.premoli at gmail.com
Thu Apr 25 13:42:33 CEST 2013


I have a problem in reading .dat Brain Vision files with fieldtrip.

The export parameters used in Brain Vision are:

*** Generic Data Export ***
File name parameter: $n_$h
File extension: .dat
Write header file: yes
Write marker file: yes
Format: ASCII
Orientation: MULTIPLEXED
Line Delimiter: CRLF (PC style)
Add channel names: no
Overwrite default decimal symbol: yes
Decimal symbol: .
Export all channels: yes

The code in fieldtrip to read the data is:

cfg= [];
cfg.dataset= sprintf('%s.dat',read_data_name);
cfg.trialdef.eventtype= 'Stimulus';
cfg.trialdef.eventvalue= {cond1;cond2;cond3;cond4}';
cfg.trialdef.poststim= 0.5;
cfg.trialdef.prestim= 0.3;
cfg = ft_definetrial(cfg);
cfg.channel    = {'all'};
cfg.continuous = 'no';
trl = cfg.trl;

The problem is that for some subjects is working and for others not.

The files are exported exactly in the same way and they undergo exactly the
same steps in the Brain Vision analyzer.

The error I encounter is:

Error using str2num (line 33)

Requires string or character array input.

Error in read_brainvision_eeg (line 112)

    dat(line,:) = str2num(str);

Error in ft_read_data (line 340)

    dat = read_brainvision_eeg(filename, hdr.orig, begsample, endsample,

Error in ft_preprocessing (line 503)

      dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample',
begsample, 'endsample', endsample, 'chanindx', rawindx,

      'checkboundary', strcmp(cfg.continuous, 'no'), 'dataformat',

Do you have any ideas on how I can fix this?

Any help would be much appreciated.



Isabella Premoli, PhD student
Department of Neurology,
Tübingen University Hospital,
Hoppe-Seyler-Str. 3, D-72076 Tübingen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130425/734a83ac/attachment-0001.html>

More information about the fieldtrip mailing list