[FieldTrip] using ft_definetrial

Eelke Spaak eelke.spaak at donders.ru.nl
Mon Jul 13 18:36:28 CEST 2015


Hi Nikola,

Try specifying cfg.trialdef.eventvalue = 1; (or [1]), so specify it as
a double-valued vector instead of a cell array. Does that work?

Best,
Eelke

On 13 July 2015 at 17:10, Nikola Valchev <nikola.valchev.umcg at gmail.com> wrote:
> Dear experts,
>
> I get a strange error when attempting to define the trials in my data. I
> preprocess my data first and then I call ft_definetrial with the option:
>
>
>
> cfg.trialdef.eventtype  = '?';
>
>
>
> This way I see that my trigger file is read successfully:
>
>
>
> evaluating trialfunction 'ft_trialfun_general'
>
> reading the events from 'C:\eeg_anita\data\S14\s14_CI_1.cnt'
>
> the following events were found in the datafile
>
> event type: 'trigger' with event values: '1' '3' '6' '9'
>
> no trials have been defined yet, see FT_DEFINETRIAL for further help
>
> found 180 events
>
> created 0 trials
>
> the call to "ft_definetrial" took 1 seconds
>
>
>
> But then when I change the setting to:
>
> cfg.trialdef.eventtype=’trigger’
>
> cfg.trialfun                = 'ft_trialfun_general';
>
> cfg.trialdef.eventvalue     = {'1'};
>
> cfg.trialdef.prestim        = .2;
>
> cfg.trialdef.poststim       = 6;
>
> cfg = ft_definetrial(cfg);
>
>
>
> I get the error:
>
>                 ??? Error using ==> ft_definetrial at 184
>
> No trials were defined, see FT_DEFINETRIAL for help.
>
>
>
> Anyone has an idea how to solve this?
>
>
>
> Best
>
> Nikola
>
>




More information about the fieldtrip mailing list