[FieldTrip] Problem reading trials into ft_rejectvisual
Dashiel Munding
dashiel.munding at gmail.com
Sun Apr 8 20:56:22 CEST 2012
Thought an example of the error message I'm getting might be useful in
diagnosing the problem. I would delve further but I'm not an
experienced MATLAB user, so I don't think my investigation would be
very fruitful!
---
Error using subsindex
Function 'subsindex' is not defined for values of class 'cell'.
Error in selfromraw (line 11)
data.trial = data.trial(selrpt);
Error in ft_selectdata_old (line 544)
data = selfromraw(data, 'rpt', selrpt);
Error in ft_selectdata (line 45)
[varargout{1:nargout}] = ft_selectdata_old(varargin{:});
Error in ft_rejectvisual (line 196)
data = ft_selectdata(data, 'rpt', cfg.trials);
On 8 April 2012 20:52, Dashiel Munding <dashiel.munding at gmail.com> wrote:
> 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