MATLAB: Do I get the error “mccExcludedFiles.log: Permission denied” when I am using the MATLAB Compiler

compilerdeniederrorMATLABMATLAB Compilerpermission

Why do I get the error "mccExcludedFiles.log: Permission denied" when I am using the MATLAB Compiler?
When I execute the following command:
mcc -m filename
where "filename" is the name of the file that I want to compile, I get the following error message: ERROR: mccExcludedFiles.log: Permission denied Could not create the log file containing the list of functions excluded from the CTF file.
Depfun error: 'Unexpected error thrown'
??? Error executing mcc, return status = 1.

Best Answer

This error occurs when you do not have write permissions for the current working directory. You will not be able to run the MCC command in a directory for which you do not have write permissions.
In order to work around this you can use the '-d' switch and specify a directory for which you have write permissions so that the generated output files can be saved there.