[FieldTrip] Error using ft_definetrial (line 188)

Eric Gabriel ericgabriel.rodrigues at hotmail.com
Tue Sep 11 15:06:33 CEST 2018


Hi, my name is Eric Rodrigues
I am a Master's student in Neuroengineering at the Santos Dumont Institute in Brazil.

I would like to define the data that will be read for preprocessing, for this I am using the 'ft_definetrial' function. I initially used the following script:

cfg = [];
cfg.dataset             = 'rat1.nex';
cfg.trialdef.eventtype = '?';
dummy                   = ft_definetrial(cfg);

evaluating trialfunction 'ft_trialfun_general'
reading the header from 'rat1.nex'
reading the events from 'rat1.nex'
the following events were found in the datafile
event type: 'AllFile                                                         '
with event values:
event type: 'Event03                                                         '
with event values:
event type: 'Event04                                                         '
with event values:
event type: 'Event05                                                         '
with event values:
event type: 'Event06                                                         '
with event values:
event type: 'Event07                                                         '
with event values:
event type: 'Event08                                                         '
with event values:
event type: 'Event17                                                         '
with event values:
event type: 'Event18                                                         '
with event values:
event type: 'Event19                                                         '
with event values:
event type: 'Event20                                                         '
with event values:
event type: 'Event21                                                         '
with event values:
event type: 'Event22                                                         '
with event values:
event type: 'Event23                                                         '
with event values:
event type: 'Start                                                           '
with event values:
event type: 'Stop                                                            '
with event values:

no trials have been defined yet, see FT_DEFINETRIAL for further help
found 4620 events
created 0 trials
the call to "ft_definetrial" took 1 seconds and required the additional allocation of an estimated 0 MB
>>

I want to create windows of 8 seconds (4 seconds before and 4 seconds later) in relation to Event 21, for this:

cfg                         = [];
cfg.dataset             = 'rat1.nex';
cfg.trialfun                = 'ft_trialfun_general';
cfg.trialdef.eventtype      = 'Event21';
cfg.trialdef.eventvalue     = '?';
cfg.trialdef.prestim        = 4; % in seconds
cfg.trialdef.poststim       = 4; % in seconds

cfg = ft_definetrial(cfg);

However, the following error appears:

Error using ft_definetrial (line 188)
no trials were defined, see FT_DEFINETRIAL for help

Thanks in advance for the help.



Eric Gabriel Oliveira Rodrigues
Engenheiro Civil - CREA: 2116637597 - RN
Mestrando em Neuroengenharia
Edmond and Lily Safra International Institute of Neuroscience
Macaiba, RN - Brazil.
(84) 99627-5378
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180911/4ab323c2/attachment.html>


More information about the fieldtrip mailing list