Back to the main page.

Bug 3322 - ft_timelockstatistics using spm 8, not compatible with Matlab 2017

Status CLOSED DUPLICATE
Reported 2017-07-06 23:51:00 +0200
Modified 2019-08-10 12:40:44 +0200
Product: FieldTrip
Component: external
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P5 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Arnaud - 2017-07-06 23:51:36 +0200

Hi, Using the code from your tutorial http://www.fieldtriptoolbox.org/development/cluster_permutation_timelock, the within subject part, with your template data : " cfg = []; cfg_neighb = []; cfg_neighb.method = 'distance'; neighbours = ft_prepare_neighbours(cfg_neighb, allsubjFIC{1,1}); cfg.neighbours = neighbours; cfg.channel = {'MEG'}; cfg.latency = [0 1]; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.neighbours = neighbours; % same as defined for the between-trials experiment cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 500; subj = 10; design = zeros(2,2*subj); for i = 1:subj design(1,i) = i; end for i = 1:subj design(1,subj+i) = i; end design(2,1:subj) = 1; design(2,subj+1:2*subj) = 2; cfg.design = design; cfg.uvar = 1; cfg.ivar = 2; [stat] = ft_timelockstatistics(cfg, allsubjFIC{:}, allsubjFC{:}) " With the modification I made and reported in another bug report on the last command line which is "[stat] = ft_timelockstatistics(cfg, allsubjFIC, allsubjFC)" on the tutorial and not working. I have the error : '/usr/lib/system/libsystem_coreservices.dylib->/usr/lib/libgcc_s.1.dylib->/Users/spillay/Documents/MATLAB/fieldtrip/external/spm8/spm_bwlabel.mexmaci64' Missing symbol '_strncmp' required by '/usr/lib/system/libsystem_coreservices.dylib->/usr/lib/libgcc_s.1.dylib->/Users/spillay/Documents/MATLAB/fieldtrip/external/spm8/spm_bwlabel.mexmaci64' Missing symbol '_strchr' required by '/usr/lib/system/libsystem_stats.dylib->/usr/lib/libgcc_s.1.dylib->/Users/spillay/Documents/MATLAB/fieldtrip/external/spm8/spm_bwlabel.mexmaci64' Missing symbol '_strncmp' required by '/usr/lib/system/libsystem_stats.dylib->/usr/lib/libgcc_s.1.dylib->/Users/spillay/Documents/MATLAB/fieldtrip/external/spm8/spm_bwlabel.mexmaci64'. Error in findcluster (line 90) [labelmat(spatdimlev, :, :), num] = spm_bwlabel(double(reshape(onoff(spatdimlev, :, :), nfreq, ntime)), 6); % the previous code contained a '4' for input Error in clusterstat (line 197) posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan); Error in ft_statistics_montecarlo (line 347) [stat, cfg] = clusterstat(cfg, statrand, statobs); Error in ft_timelockstatistics (line 184) [stat, cfg] = statmethod(cfg, dat, design); With hundreds of line as the first lines before. So it seems the "spm_bwlabel" function of spm was in cause. With some research on the web I found that spm 8 was not compatible anymore with the last versions of Matlab, I'm using Matlab 2017a on a OS X Yosemite 10.10.5. Solution : I just removed the spm2 and spm 8 folders from the external folder of fieldtrip, letting only spm12 and it worked. But maybe you would like to change the code so it's using the good version of spm depending on Matlab version. Thank you, Best regards, Arnaud


Robert Oostenveld - 2017-07-07 10:04:37 +0200

This is a known issue on OS X in combination with R2017. It is possible to recompile the SPM8 mex files on R2017. We have not yet been able to get a set of mex files that works both on older and newer MATLAB versions. *** This bug has been marked as a duplicate of bug 3288 ***


Robert Oostenveld - 2019-08-10 12:34:34 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.


Robert Oostenveld - 2019-08-10 12:40:44 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.