License issue in MATLAB?

13 Ansichten (letzte 30 Tage)
Daigo
Daigo am 14 Sep. 2023
Kommentiert: dpb am 15 Sep. 2023
I'm trying to fix a long launching time of my MATLAB/R2022a based on Why does MATLAB get stuck in the "Initializing" or "Busy" state or take a long time to start? - MATLAB Answers - MATLAB Central (mathworks.com). However, I even get errors in the very initial steps.
1. Checking if it is a licensing issue.
I tried to start MATLAB using "-c" startup, but failed. Below is the command I ran on command prompt on my Windows computer:
"$MATLAB\bin\win64\MATLAB.exe" - c C:\Users\Daigo\AppData\Roaming\MathWorks\MATLAB\R2022a_licenses\license_XXX.lic
I get "The system cannot find the path specified." error. I'm pretty sure the license is in the absolute path I'm specifiying, but it's not recognized.
2. Determining the problematic license.
I also ran the licesing test on MATLAB terminal by running
matlab.internal.licensing.pathTest
which gave me:
Determining checkout time for MATLAB.
MATLAB's license search path is :
C:\Users\Daigo\AppData\Roaming\MathWorks\MATLAB\R2022a_licenses\license_XXX.lic;C:\Program Files\MATLAB\R2022a\licenses\license.dat;C:\Program Files\MATLAB\R2022a\licenses
C:\Users\Daigo\AppData\Roaming\MathWorks\MATLAB\R2022a_licenses\license_XXX.lic
Checkout time 13 milliseconds. No MATLAB Feature exists on the path (status -8)
C:\Program Files\MATLAB\R2022a\licenses\license.dat
No License File exists on this path.
C:\Program Files\MATLAB\R2022a\licenses
No License File exists on this path.
Apparently, there are some problems in the license or environment variable. I'm not so sure what "No MATLAB Feature exists on the path" means. Regarding the last two lines, I confirmed that "C:\Program Files\MATLAB\R2022a\licenses" didn't exist.
Does anyone have advice on how to fix this problem?
  7 Kommentare
dpb
dpb am 15 Sep. 2023
Bearbeitet: dpb am 15 Sep. 2023
I have only used (or even seen) a 'nix box as the host part of the Foxboro I/A (Intelligent Automation) power plant control system simulator at the EPRI I&C Center and only did a very little Fortran code development to customize some of the thermodynamics models to match specific plant configurations some 30 years ago by now...
"... "$MATLAB/bin/win64/MATLAB.exe" would find the MATLAB environment variable and drop it in in place of the first MATLAB token."
Well, it seems the OP used that syntax but I couldn't make it work with powershell, but that also may be operator error; as noted I can't find a thing in the doc that actually talks about how to do such. I'm sure it has to be possible, but it's an almost totally opaque box as to how...
dpb
dpb am 15 Sep. 2023
Well, I did some digging and found a tutorial that explained some, but not all...and am both somewhat enlightened but also even more confused than before...
PS C:\Users\owner> $env:MATLAB = 'C:\ML_R2021b'
PS C:\Users\owner> dir env:M*
Name Value
---- -----
MATLAB C:\ML_R2021b
PS C:\Users\owner> "$env:MATLAB\bin\win64\matlab.exe"
C:\ML_R2021b\bin\win64\matlab.exe
PS C:\Users\owner>
does the expansion as advertised, but powershell only returns the string, it doesn't dispatch the command as used to in CMD. Not sure how you then do that yet.
Also, nota bene had to reference "env:MATLAB" to get the environment variable; just plain $MATLAB is (apparently) just a string reference and it hadn't been defined. To do that one just writes
PS C:\Users\owner> $MATLAB = 'C:\ML_R2021b'
and then the OPs syntax is expanded and returns the expect string -- but it still doesn't execute it.
I've no klew as yet on how that is done...

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by