[FieldTrip] ft_timelockanalysis, trial selection

Lieneke. Janssen lieneke.janssen at student.ru.nl
Tue Apr 12 14:59:46 CEST 2011


Dear fieldtrippers, 

Previously, I could do time-locked analysis on select trials only. Today however, I get an error (same script and similar data) which you can see below. 

After quite some debugging attempts, going into the other functions involved and googling a bit I think I found a little bug in the private function [data] = selfromraw(data, varargin{:}) that is called by ft_selectdata.

In this private function keyval(key,varargin{:}) is not yet changed into keyval(key,varargin). See log messeage at http://code.google.com/p/fieldtrip/source/detail?spec=svn3292&r=3292.

If you run keyval(key,varargin{:}) on the command line you get the error, if you run keyval(key,varargin) on the command line you don't. 

Hopefully, somebody can help me with this :). 
Thanks! 

Best, 
Lieneke 


 





---------------------------------------------------------------
??? Error using ==> keyval
the first input argument should be a cell-array or structure

Error in ==> selfromraw at 3
selrpt  = keyval('rpt',  varargin{:}); selectrpt  =
~isempty(strmatch(varargin(cellfun(@ischar, varargin)), 'rpt'));

Error in ==> ft_selectdata at 508
    data = selfromraw(data, 'rpt', selrpt);

Error in ==> ft_timelockanalysis at 148
  data = ft_selectdata(data, 'rpt', cfg.trials);

Error in ==> lj_main_rfm at 255
        timelock_out   = ft_timelockanalysis(cfg, resampled_data);



More information about the fieldtrip mailing list