bug report- error with prepare_concentricspheres.m

Enrico Glerean e.glerean at GMAIL.COM
Tue Sep 8 10:44:23 CEST 2009


I am having an error running the example giving in the help of
prepare_concentricspheres.m (using most recent version Revision 1.8
2009/07/16 09:14:52, se below).

I think it's due to the fact that unique wants a simple array as
input, not structs. Any chances it could be resolved quickly?
Otherwise, could you just point out the final structure of the vol?

is it:

for i=1:4
vol(i).r = ...
vol(i).o = ...
vol(i).c= ..

or is it

vol.r = [r1 r2 r3 r4]
vol.c=[c1 c2 c3 c4]

best regards


-------- code from help prepare_concentricspheres

    % first create 4 surfaces that represent the brain, csf, skull and skin
    radius = [86 88 92 100];
    headshape = [];
    for i=1:4
      pnt = randn(100,3);
      for j=1:size(pnt,1)
        pnt(j,:) = pnt(j,:) ./ norm(pnt(j,:));
      headshape(i).pnt = radius(i) .* pnt + 0.1*randn(size(pnt));

    % then construct a volume conduction model of the head by fitting
4 concentric spheres
    cfg = [];
    cfg.headshape    = headshape;
    cfg.conductivity = [0.3300 1 0.0042 0.3300]
    [vol, cfg] = prepare_concentricspheres(cfg)

??? Error using ==> unique
Too many input arguments.

Error in ==> prepare_mesh_headshape at 30
  headshape.pnt = unique(headshape.pnt, 'rows');

Error in ==> prepare_concentricspheres at 82
headshape = prepare_mesh_headshape(cfg);

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/neuroimaging/fieldtrip.

More information about the fieldtrip mailing list