[FieldTrip] ft_redefinetrial does not yield correct number of trials
Marek
marek-b at wp.pl
Sat Feb 25 22:00:04 CET 2017
Hello,
I've got the following problem. When I want to reduce the number of trials in my dataset using syntax:
cfg = [];
cfg.trials = [1 1 1 1 1 1 1 1 1];
fdata_freq_stim = ft_redefinetrial(cfg, data_freq_stim);
I get the output messages:
the input is raw data with 40 channels and 30 trials
selecting 9 trials
the call to "ft_selectdata" took 0 seconds
the call to "ft_redefinetrial" took 0 seconds
but the resulting variable contains only one trial. In fact, the same output occurs with any setting of cfg.trials, if it contains only ones. The resulting variable contains only one trial, while the message correctly reports the number of selected trials.
When using
cfg.trials = [1 0 0 1 1];
an error message appears:
the input is raw data with 40 channels and 30 trials
selecting 9 trials
Subscript indices must either be real positive integers or logicals.
What is wrong here? Any help would be appreciated.
MATLAB Version: 8.6.0.267246 (R2015b)
FieldTrip version: fieldtrip-20170224
Thanks,
Marek
More information about the fieldtrip
mailing list