[FieldTrip] errors replicating Salzburg Fieldtrip tutorial

Irene Varela Leniz irene.varela at alumni.mondragon.edu
Wed May 22 09:21:31 CEST 2019


Dear Fieldtripers,

I am trying to replicate the well-known *tutorial:salzburg [FielTrip] (*
http://old.fieldtriptoolbox.org/tutorial/salzburg). Anyway, I am getting
some errors that I could not manage to solve. I would be really grateful if
someone could lend me a hand.

I am working on section called "Localizing auditory evoked fields using
beamforming techniques in parceled brain space". I managed to compute the
*sourcemode*l as explained in the tutorial without any problem. But now,
when "Computing the leadfield" I get an error message related with
*sourcemodel.inside
*field, which makes it impossible for me to create the leadfield. The
structure is the following:

*sourcemodel = *

*  struct with fields:*

*       pos: [6426×3 double]*

*       dim: [17 21 18]*

*      unit: 'm'*

*    inside: [17×21×18 logical]*

*       cfg: [1×1 struct]*


The structure for computing the leadfield:







*  cfg                 = [];                        cfg.label         =
data.label;                        cfg.elec          = data.elec;
              cfg.vol         = hdm;
cfg.lcmv.reducerank = 2; % I am working with EEG data
  cfg.grid = sourcemodel;                        [grid] =
ft_prepare_leadfield(cfg)*


An the error I get:


Operands to the || and && operators must be convertible to logical scalar
values.


Error in ft_checkconfig (line 529)

  elseif isfield(cfg, 'grid') && isfield(cfg.grid, 'inside') &&
any(cfg.grid.inside>1)


Error in ft_prepare_leadfield (line 156)

cfg = ft_checkconfig(cfg, 'inside2logical', 'yes');

I think the error comes from the fact that *sourcemodel.inside* is a
3-dimensional logical array. The operation - any(cfg.grid.inside>1)   does
not output a logical scalar value because* sourcemodel.inside* is in 3
dimensions.
So far I have always worked with models whose inside parameter was of one
dimension. Anyway, I'm not sure if this is the problem, please correct me
if I'm wrong.

Has anyone encountered this same problem, and does anyone know how to fix
it?

Thank you very much for your attention,


Irene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190522/a59a0cce/attachment-0001.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list