[FieldTrip] odd interaction between matlab and ft version in ft_volumerealign

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Thu May 5 21:05:48 CEST 2016

Hi Bruno,

I think we have just been looking into it. And with just, I mean really just. I just merged a pull request from Roemer van der Meij into github.com/fieldtrip/fieldtrip<http://github.com/fieldtrip/fieldtrip> (#141). This merge is related to a graphics issue that needs to be resolved differently for different matlab versions (in particular for matlab>=2014 it requires a different solution than matlab<2014). I wonder whether this is related to the problem you report.
We did not do an comparable extensive sweep of the possible combinations (i.e. matlab versions and fieldtrip versions), so could you pull a copy from git and try it out? We have a ‘tutorial’ on the fieldtrip wiki that explains one way of getting yourself a local copy of the code.



On 05 May 2016, at 20:37, Bruno L. Giordano <brungio at gmail.com<mailto:brungio at gmail.com>> wrote:


I am trying to run these commands on different matlab versions(2013 vs. 2015) and using different FT versions (20141209 vs. 20160317; let's call them 2014 vs. 2016).

The code I run is as follows:


cfg.fiducial.nas=[59 168 104];
cfg.fiducial.lpa=[138 133 28];
cfg.fiducial.rpa=[147 138 169];

% hs.pnt=hs.pos; %required for later fieldtrip versions or gives an error, see v



Unless otherwise noted, the code fails when I quit the interactive alignment window.

It fails in the following cases (errors below):
Matlab: 2015; FT: 2016
Matlab: 2015; FT: 2014
Matlab: 2013; FT: 2016

and is successful only for
Matlab: 2013; FT: 2014

Did anyone experience similar problems? Is there a workaround? If not, would it be complicated to estimate the transformation matrices myself once I know the right scale/translation/rotation parameters?

Thank you,


Matlab: 2013; FT: 2016
Matlab: 2013; FT: 2016
Fails when quitting interactive alignment window

Error using cell/ismember>cellismemberR2012a (line 193)
Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.

Error in cell/ismember (line 57)
   [varargout{1:max(1,nargout)}] = cellismemberR2012a(A,B);

Error in ft_senstype (line 303)
   if     (mean(ismember(ft_senslabel('ant128'),         sens.label)) > 0.8)

Error in ft_datatype_sens (line 138)
ismeg = ft_senstype(sens, 'meg');

Error in ft_checkconfig (line 250)
 cfg.elec = ft_datatype_sens(cfg.elec);

Error in ft_interactiverealign (line 71)
cfg.template   = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'});

Error in ft_volumerealign (line 691)
     tmpcfg = ft_interactiverealign(tmpcfg);

Matlab: 2015; FT: 2016
Matlab: 2015; FT: 2016
hs.pnt=hs.pos; %required or will give another error
Fails when quitting interactive alignment window

Error using  *
Inner matrix dimensions must agree.

Error in ft_sourceinterpolate (line 328)
       av     = interpmat*fv;

Error in ft_volumerealign (line 752)
     smoothdist          = ft_sourceinterpolate(tmpcfg, functional, target);

Matlab: 2015; FT: 2014
Matlab: 2015; FT: 2014
hs.pnt=hs.pos; %required or will give another error
Fails when creating the interactive alignment window

ield assignment to a non-structure array object.

Error in ft_plot_mesh (line 61)
 bnd.pnt = bnd;

Error in ft_interactiverealign>cb_redraw (line 282)
   ft_plot_mesh(template.elec.chanpos,'vertexcolor', 'b', 'vertexsize',10);

Error in ft_interactiverealign (line 126)

Error in ft_volumerealign (line 584)
     tmpcfg = ft_interactiverealign(tmpcfg);

Bruno L. Giordano, PhD
Institute of Neuroscience and Psychology
58 Hillhead Street, University of Glasgow
Glasgow, G12 8QB, Scotland
T +44 (0) 141 330 5484
Www: http://www.brunolgiordano.net<http://www.brunolgiordano.net/>
Email charter: http://www.emailcharter.org/
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160505/21f91949/attachment-0002.html>

More information about the fieldtrip mailing list