[FieldTrip] problem with ft_multiplotER
Kanal Eliezer
ekanal at cmu.edu
Wed Mar 2 19:10:23 CET 2011
Hello FT users -
I'm experiencing an odd error with ft_multiplotER, which seems to be a problem in the code. Attempting to use the function results in the following error (note: "data_timelock" is the output of the ft_timelockanalysis function):
~~~~
>> cfg=[];
>> cfg.layout = 'neuromag306all.lay';
>> ft_multiplotER(cfg, data_timelock)
??? Undefined function or variable "data".
Error in ==> ft_datatype_timelock at 70
if isfield(data, 'numsamples'), data = rmfield(data, 'numsamples'); end
Error in ==> ft_checkdata at 163
data = ft_datatype_timelock(data);
Error in ==> ft_multiplotER at 179
varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'timelock', 'freq'});
~~~~
Looking in the ft_datatype_timelock function, it takes an input of "timelock" but seems to try to work on a "data" field:
~~~~
function timelock = ft_datatype_timelock(timelock, varargin)
...
% remove the unwanted fields, it is unclear when they were precisely used
if isfield(data, 'numsamples'), data = rmfield(data, 'numsamples'); end
if isfield(data, 'numcovsamples'), data = rmfield(data, 'numcovsamples'); end
if isfield(data, 'numblcovsamples'), data = rmfield(data, 'numblcovsamples'); end
~~~~
Is this intentional? I do see that it's called with varargin, but there's nowhere where the input arguments are assigned to the "data" variable. If this isn't the problem, can anyone help me figure out what the actual problem is? Thanks -
Elli Kanal
More information about the fieldtrip
mailing list