<div dir="ltr"><div dir="ltr">Hello,<div>My name is Zhen Ni. I'm a senior research fellow working at the National Institutes of Health.</div><div>I'm using FieldTrip (version 20200423) to perform a cluster-based permutation test. My script is largely based on the example you showed on the FieldTrip webpage. The script stopped after a while with a technical problem. I copied the error message below.</div><div>I also tried following your instruction and used the dataset you uploaded on the webpage. The same error message comes out. I wonder if you may take a look at my codes and help me out.</div><div><br></div><div>Many thanks.</div><div>Zhen</div><div><br></div><div><br></div><div><div><br></div><div>Invalid MEX-file '/Users/nz/Documents/MATLAB/external/spm8/spm_bwlabel.mexmaci64':</div><div>dlopen(/Users/nz/Documents/MATLAB/external/spm8/spm_bwlabel.mexmaci64, 6): Library</div><div>not loaded: @loader_path/libmex.dylib</div><div>  Referenced from: /Users/nz/Documents/MATLAB/external/spm8/spm_bwlabel.mexmaci64</div><div>  Reason: image not found</div><div><br></div><div>Error in findcluster (line 87)</div><div>    [labelmat(spatdimlev, :, :), num] = spm_bwlabel(double(reshape(onoff(spatdimlev,</div><div>    :, :), nfreq, ntime)), 6); % the previous code contained a '4' for input</div><div><br></div><div>Error in clusterstat (line 202)</div><div>      posclusobs = findcluster(reshape(postailobs,</div><div>      [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);</div><div><br></div><div>Error in ft_statistics_montecarlo (line 353)</div><div>  [stat, cfg] = clusterstat(cfg, statrand, statobs);</div><div><br></div><div>Error in ft_timelockstatistics (line 184)</div><div>  [stat, cfg] = statmethod(cfg, dat, design);</div></div></div></div>