[FieldTrip] Problem with EGI file

Arti Abhishek mailtome.2113 at gmail.com
Mon May 30 05:38:53 CEST 2016


Dear fieldtrip community,

I am trying to analyse eeg recorded from EGI. I want to highpass filter the
data before epoching and I managed to create the following script from the
fieldtrip documentation. However I am getting an error (please see below).
Could someone suggest a fix.

Thank you,
Arti


datadir = 'D:\EGITest';
dataset =  fullfile(datadir, 's01_CH.mff');
headerformat = 'egi_mff_v2';
dataformat   = 'egi_mff_v2';
eventformat  = 'egi_mff_v2';
hdr   = ft_read_header(dataset, 'headerformat', headerformat);
dat   = ft_read_data(dataset,   'headerformat', headerformat, 'dataformat',
dataformat);
event = ft_read_event(dataset,  'headerformat', headerformat,
'eventformat', eventformat);
fg = [];
cfg.data = dat;
cfg.headerfile=hdr;
cfg.trialdef.triallength = Inf;
cfg.trialdef.ntrials = 1;
cfg = ft_definetrial(cfg);
cfg.hpfilter = 'yes';
cfg.hpfreq = .1;
cfg.hpfilttype = 'firws';
cfg.hpfiltdir = 'onepass-zerophase';
alldata = ft_preprocessing(cfg);

I am getting the following error

Undefined function 'exist' for input arguments of type
'struct'.

Error in isdir (line 10)
result = exist(dirpath,'dir') == 7;

Error in ft_filetype (line 150)
if isdir(filename)

Error in ft_checkconfig (line 559)
    cfg.dataformat = ft_filetype(cfg.datafile);

Error in ft_definetrial (line 128)
cfg = ft_checkconfig(cfg, 'dataset2files', 'yes');
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160530/1ff43820/attachment-0001.html>


More information about the fieldtrip mailing list