MATLAB: How to force MATLAB to use a specific license file

MATLAB

How do I force MATLAB to use a specific license file?

Best Answer

You can supply the -c command line flag to the main MATLAB executable to force MATLAB to use a specific license file. The argument for this flag is the location of the license file in question. For example, on Windows:
"C:\Program Files\MATLAB\R2016a\bin\matlab.exe" -c "C:\Program Files\MATLAB\R2016a\licenses\license.lic"
This command will force MATLAB to use the license file at "C:\Program Files\MATLAB\R2016a\licenses\license.lic."
For information on where the license files are stored, please refer to the following article: