[FieldTrip] Possible BUG in ft_redefinetrial using the cfg.trl option

andrea brovelli andrea.brovelli at univ-amu.fr
Fri Mar 20 15:14:29 CET 2015

Dear all,

The bugzilla server seems to be down for maintenance. So I post it here.

I noticed a possible bug in ft_redefinetrial: if I realign my data on a different event using the cfg.trl option, the output data is corretly aligned, BUT the output data structure contains ONLY the first trial of the input data structure, repeated for the exact number of trials.

% In other words, if you do this...
cfg      = [];
cfg.trl  = trl; % N x 3 matrix = [ sample_start sample_end sample_offset ]
data_out = ft_redefinetrial(cfg, data_in);

% And then plot the first 3 trials for the first channel....
hold on

... you will notice that you are plotting the first trial in the original data_in but shifted in time.

Could you also check please ?

I used the latest version of Fieldtrip fieldtrip-20150318



More information about the fieldtrip mailing list