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

64 views (last 30 days)
How do I force MATLAB to use a specific license file?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 23 Jun 2020
Edited: MathWorks Support Team on 23 Jun 2020
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:
  1 Comment
Hishan Faizer
Hishan Faizer on 22 Jan 2021
I always get the error message: Invalid use of operator.
This is my code:
"C:\Program Files\MATLAB\R2020b\bin\matlab.exe" -c "C:\Program Files\MATLAB\R2020b\licenses\license.lic"
Does anyone know what I am probably doing worng?
Thank you!

Sign in to comment.

More Answers (1)

Jason Doyle
Jason Doyle on 7 Jul 2022
What about on linux when I just have the license number?

Tags

No tags entered yet.

Products


Release

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by