[FieldTrip] Problem reading trials into ft_rejectvisual

Dashiel Munding dashiel.munding at gmail.com
Sun Apr 8 20:52:40 CEST 2012


Hello all,

I'm trying to figure out a way of reading only selected trials into
analysis without running through ft_rejectvisual every time. I have a
list of trials that I have already rejected, and the documentation
(http://fieldtrip.fcdonders.nl/reference/ft_rejectvisual) says that I
should be able to use cfg.trials as a 1xN vector to put in a list of
those trials that I want to use :

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

I've tried various formats for this vector (I'm new to both MATLAB and
fieldtrip, so this might be a simple solve) but I can't get a positive
result. I know I can save out the variable and read it in again at a
later date, but this seems like a very inefficient way of doing it if
all I need is a list of numbers, instead of a 1.5gb .m file...

Has anyone come across/solved this problem? Can anyone provide me with
an example of the syntax fieldtrip is expecting?

I've tried:

cfg.trials = {'all' '-56', '-151', '-232', '-53'};

cfg.trials = {'1','2','3','4','5','6','7','8','9','10','46'};

cfg.trials = {1,2,3,4,5,6,7,8,9,10,46};

and some other efforts to no avail!

Thanks in advance, and sorry for naivety!

Dashiel



More information about the fieldtrip mailing list