[FieldTrip] ft_freqstatistics mex file
Konstantinos Tsilimparis
konstantinos.tsilimparis at outlook.com
Wed Aug 28 03:15:53 CEST 2024
Hi Carlijn,
I noticed no one had replied, so I thought I'd give it a shot. While I'm not an expert on .mex files, I can share what I know.
I fetched the latest FieldTrip version from GitHub today (28/08/2024), and it has combineClusters.mexw64<https://github.com/fieldtrip/fieldtrip/blob/master/private/combineClusters.mexw64>, so I would expect that yours should have it as well.
>From a quick google search, I found two possible ways to fix your error:
1. remove the .mex files (i.e., combineClusters.mexa64, combineClusters.mexmaca64, combineClusters.mexw32 and combineClusters.mexw64) and rely on the .m file: combineClusters.m (see this previously asked question in the mailing list: https://mailman.science.ru.nl/pipermail/fieldtrip/2020-March/039897.html)
2. sometimes specific MATLAB versions and/or specific operating systems require that you recompile the mex files. To do that use ft_compile_mex as explained in: https://www.fieldtriptoolbox.org/faq/compile/.
Hope this helps!
Best,
Konstantinos
From: fieldtrip <fieldtrip-bounces at science.ru.nl> On Behalf Of Boomen, C. van den (Carlijn) via fieldtrip
Sent: Wednesday, August 21, 2024 10:40 AM
To: fieldtrip at science.ru.nl
Cc: Boomen, C. van den (Carlijn) <C.vandenBoomen at uu.nl>
Subject: [FieldTrip] ft_freqstatistics mex file
Dear Fieldtrippers,
I'm trying to run the ft_freqstatistics function in my script copied below. It did work in Matlab2021 with Fieldtrip20190218. Now I moved to Matlab2024 with Fieldtrip20240704 and I get the error copied below. Indeed, the file combineCluster.mexw64 was in the 2019 but not in the 2024 version. I copied it to the 2024 version just to try, but got the same error. Does any of you know how I could solve this?
Thank you so much!
Kind regards,
Carlijn
Script
group1 = GA_HR32; %change these to change group comparisons
group2 = GA_LR32;
freq = 1; %change this to investigate other frequency (1 = delta; 2 = theta; 3 = lowal; 4 = hial; 5 = beta; 6 = gamma)
% test group difference using independent samples t-test
cfg = [];
cfg.avgoverfreq = 'yes'; % set 'no' if you want stats for separate frequencies
cfg.method = 'montecarlo'; %stats;
cfg.statistic = 'ft_statfun_indepsamplesT'; %ttest2;
cfg.correctm = 'cluster';
cfg.clusteralpha = 0.05;
cfg.clusterstatistic = 'maxsum';
cfg.numrandomization = 500;
cfg.minnbchan = 2;
cfg.tail = 0;
cfg.clustertail = 0;
cfg.alpha = 0.025;
cfg_neighb.method = 'distance';
cfg_neighb.layout = ... (deleted full directory for privacy, but directs to file fieldtrip-20240704\template\layout\biosemi32.lay')
cfg.neighbours = ft_prepare_neighbours(cfg_neighb, EEGdata);
design = zeros(1,size(group1{freq,1}.powspctrm,1)+size(group2{freq,1}.powspctrm,1));
design(1,1:size(group1{freq,1}.powspctrm,1)) = 1;
design(1,(size(group1{freq,1}.powspctrm,1)+1):(size(group1{freq,1}.powspctrm,1)+size(group2{freq,1}.powspctrm,1))) = 2;
cfg.design = design;
cfg.ivar = 1;
[groupdiff] = ft_freqstatistics(cfg,group1{freq,1},group2{freq,1});
Error
Invalid MEX-file 'D:\Users\boome102\Documents\fieldtrip-20240704\private\combineClusters.mexw64': The specified module
could not be found.
Error in findcluster (line 133)
cluster = combineClusters(uint32(labelmat), logical(spatdimneighbstructmat), uint32(numcluster));
Error in clusterstat (line 214)
posclusobs = findcluster(tmp, connmat, cfg.minnbchan);
Error in ft_statistics_montecarlo (line 364)
[stat, cfg] = clusterstat(cfg, statrand, statobs);
Error in ft_freqstatistics (line 194)
[stat, cfg] = statmethod(cfg, dat, design);
Dr. Carlijn van den Boomen
Assistant Professor | Department of Experimental Psychology | Utrecht University | Langeveld Building - room H066 | Heidelberglaan 1 | 3584 CS Utrecht | the Netherlands | phone: +31(30) 253 1266 | in office on Monday and Thursday
Cluster Chair | University College Utrecht | Newton building room Hh | the Netherlands | phone: +31(30) 253 9826 | in office on Tuesday and Wednesday
Working days: Monday to Thursday
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240828/23be3b21/attachment.htm>
More information about the fieldtrip
mailing list