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

150 Ansichten (letzte 30 Tage)
How do I force MATLAB to use a specific license file?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 27 Okt. 2023
Bearbeitet: MathWorks Support Team am 27 Okt. 2023
Note: You cannot force MATLAB to use a specific license if you are using the newer licensing technology provided by the MathWorks Service Host.
For troubleshooting reasons, you may want to start MATLAB with only a specific license file. This can be accomplished by running MATLAB with a specific command that points to a single license file you want to use. To do so, follow these steps:
Windows
  1. Launch Windows Command Prompt or Powershell
  2. Type in "matlab -c path\to\license\file\license.lic". Replace "path\to\license\file\license.lic" with the full path to the license file you want to use. Make sure to include the name of the file too. If you're unsure where your license file is that you want to use, see the link at the bottom of this answer.
  3. Press Enter on your keyboard to launch MATLAB with the single license file.
If you have multiple releases of MATLAB installed and this command is launching a different release than you want, specify the full path to the matlab.exe from where you have MATLAB installed. For example, if you want to use release R2023b, matlab.exe's full path will likely be "C:\Program Files\MATLAB\R2023b\bin". This means the command you're using in Command Prompt or Powershell will look something like this: "C:\Program Files\MATLAB\R2023b\bin\matlab.exe -c C:\Users\james\AppData\Roaming\MathWorks\MATLAB\R2023b_licenses\license_james-computer_1234_5678_R2023b.lic"
Linux
  1. Launch the Terminal application. You can find it in by searching for it with the magnifying glass in the top-right corner of your screen.
  2. Type in "/Applications/MATLAB_R2023b.app/bin/matlab -c path/to/license/file/license.lic". Replace "R2023b" with a different release of MATLAB if you are not using R2023b. Replace "path/to/license/file/license.lic" with the full path to the license file you want to use. Make sure to include the name of the file too. If you're unsure where your license file is that you want to use, see the link at the bottom of this answer.
  3. Press Return/Enter on your keyboard to launch MATLAB.
macOS
  1. Launch Terminal
  2. Type in "matlab -c path/to/license/file/license.lic". Replace "path/to/license/file/license.lic" with the full path to the license file you want to use. Make sure to include the name of the file too. If you're unsure where your license file is that you want to use, see the link at the bottom of this answer.
  3. Press Enter on your keyboard to launch MATLAB.
If you have multiple releases of MATLAB installed and this command is launching a different release than you want, specify the full path to the matlab from where you have MATLAB installed. For example, if you want to use release R2023b, matlab full path will likely be "/usr/local/MATLAB/R2023b/bin/matlab". This means the command you're using in Terminal will look something like this: "/usr/local/MATLAB/R2023b/bin/matlab -c /home/james/.matlab/R2023b_licenses/license_james-computer_1234_5678_R2023b.lic"
For more information on where the license files are typically stored, please refer to the following article:
Where can I find MATLAB license files?

Weitere Antworten (0)

Kategorien

Mehr zu Manage Products finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Produkte


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by