MATLAB: .mexmaci64 mac

MATLABmexmex compiler

Hello,
I am using someone else's toolbox in MATLAB, which contains .mexmaci64 files. I downloaded it from the internet on my computer (Mac OS Big Sur, fully updated). When I try to use these files though, I get the following error message (from Finder):
"findwithinMEX.mexmaci64” cannot be opened because it is from an unidentified developer." macOS cannot verify that this app is free from malware."
If I go into System Preferences and allow MATLAB too open the file anyways, I get the following error from MATLAB:
Error using open (line 136)
Cannot edit the MEX-file
I think that it's likely that I haven't set up MEX files correctly in MATLAB. But I wanted to see if anyone else has any guidance about how to do so. Thank you.

Best Answer

You tried to double click the file in Finder to open it.
mex files are not source code. You need special tools to examine their content, such as otool https://www.unix.com/man-page/osx/1/otool/
They are not encrypted or anything like that: they are a structured binary file that contains machine code ready to be loaded into memory and executed by the CPU.
To use them from MATLAB you make sure that the file is along your MATLAB path and then you just call the function, passing appropriate arguments in, just as if it were a MATLAB function
Related Question