[FieldTrip] ft_redefinetrial does not yield correct number of trials

Jean-Baptiste Eichenlaub jb.eichenlaub at gmail.com
Sat Feb 25 23:03:57 CET 2017


The documentation says:

cfg.trials       = 'all' or a selection given as a 1xN vector (default = 'all')

In your case, cfg.trials should be as 1xN vector containing trials' index
e.g. cfg.trials = [1:9] or cfg.trials = [1,2,3,6,8,45,67,69,89].

Thanks,

jb


On Sat, Feb 25, 2017 at 4:00 PM, Marek <marek-b at wp.pl> wrote:

> 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
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>



-- 
Jean-Baptiste Eichenlaub, PhD
MGH - Harvard Medical School
Boston, US
jb.eichenlaub at gmail.com
(1)857-654-3879
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170225/3f97c339/attachment-0002.html>


More information about the fieldtrip mailing list