setfield issue and sourcestatistics
jan-mathijs schoffelen
j.schoffelen at PSY.GLA.AC.UK
Wed Aug 20 21:03:40 CEST 2008
Dear Daniel,
The problem was hard to track down, but I noticed that an easy
workaround can be achieved, when you remove the .transform field from
your
grandaveraged source (test = rmfield(test, 'transform');
Alternatively, you can download the latest version of fieldtrip
(available as of tomorrow) in which I (hopefully) fixed the problem.
Yours,
JM
PS: Robert, maybe we could discuss this issue, because this is due to
recent changes which were made to make the difference between
volumetric and source-metric data more explicit.
On Aug 18, 2008, at 1:36 PM, Daniel Senkowski wrote:
> 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.
----------------------------------
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