On all the newer versions of MacOS, this might happen for all the MEX files.
For example, with permutation tests:
Go to the system configuration for "Security and privacy" and click Allow anyway.
Or follow the instructions from the FieldTrip or SPM websites: