setfield issue and sourcestatistics

Daniel Senkowski dsenkows at UKE.DE
Mon Aug 18 13:36:17 CEST 2008


Hi,

I am trying to run the sourcestatistic.m script on the ouput files from
sourcegrandaverage.m and receive an error message with refers to the
setfield and setsubfield scripts.

Did anyone had similar issues or has an idea how to solve it?

Thank you very much and best greetings,

Daniel



>> test

test = 

          pos: [11466x3 double]
          dim: [21 26 21]
    transform: [4x4 double]
          avg: [1x1 struct]
          var: [1x1 struct]
       dimord: 'voxel'
        trial: [1x16 struct]
       inside: [5759x1 double]
      outside: [5707x1 double]
           df: [11466x1 double]
          cfg: [1x1 struct]

>> test.trial

ans = 

1x16 struct array with fields:
    pow


>> test2 

test2 = 

          pos: [11466x3 double]
          dim: [21 26 21]
    transform: [4x4 double]
          avg: [1x1 struct]
          var: [1x1 struct]
       dimord: 'voxel'
        trial: [1x16 struct]
       inside: [5759x1 double]
      outside: [5707x1 double]
           df: [11466x1 double]
          cfg: [1x1 struct]

>>     cfg = [];
    cfg.method = 'parametric';
    cfg.statistic = 'difference';
    cfg.parameter = 'pow';
    cfg.bonferoni = 'no';
    cfg.threshold = 0.05;

    stat = sourcestatistics(cfg, test, test2);
??? Error using ==> setfield at 58
Insufficient outputs from right hand side to satisfy comma separated
list expansion on left hand side.  Missing [] are the most likely cause.

Error in ==> setsubfield at 33
s = setfield(s, t{:}, v);

Error in ==> checkdata at 403
    data = setsubfield(data, param{i}, tmp);

Error in ==> sourcestatistics at 113
    varargin{i} = checkdata(varargin{i}, 'datatype', {'source', 'volume'},
'feedback', 'no', 'inside', 'index');

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.



More information about the fieldtrip mailing list