License issue in MATLAB?
17 次查看(过去 30 天)
显示 更早的评论
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 个评论
dpb
2023-9-15
编辑:dpb
2023-9-15
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
2023-9-15
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...
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!