In my case, the following commads in Terminal app solved the problem. FT_PATH='/Users/XXXXX/Documents/MATLAB/fieldtrip-20220310' sudo xattr -r -d com.apple.quarantine $FT_PATH sudo find $FT_PATH -name *.mexmaci64 -exec spctl --add {} \; FT_PATH is your path to the fieldtrip. I hope this helps.