Where is matlabroot defined?

When I installed MATLAB, my path contained a weird hardlink so that now matlab thinks it is installed in /export/LOCALHOST/opt/MATLAB..., whereas the actual path is /opt/MATLAB...
Where is matlabroot defined and how can i update it?

4 Kommentare

Rik
Rik am 25 Sep. 2019
I doubt this is possible. I would think that would defeat the purpose of the command. You could always re-install, which would reset this.
max.s
max.s am 25 Sep. 2019
I mean it HAS to be stored / generated somewhere. If modifying it breaks something, I can always go ahead and redownload the X GB of installer, but I'd rather try that first.
Guillaume
Guillaume am 25 Sep. 2019
Wherever it may be defined is undocumented and I've never seen any information about it, so you may find it difficult to get the information. Your best bet is to raise a support request.
Saying that, on windows it appears to be stored in the registry (HKLM\SOFTWARE\Mathworks\MATLAB\yourver\MATLABROOT). However, on linux no idea what the equivalent would be.
Walter Roberson
Walter Roberson am 24 Jul. 2020
On Mac, MATLAB finds the name of the executable that it is running, and goes up two directory levels and calls that matlabroot .
For example /Volumes/ZZ9PluralZ/Applications/MATLAB_R2020a.app might be the .app . On Mac, .app are actually directories with a special structure. Inside the directory, Contents/Info.plist would be consulted, looking for the key "Executable file", which says "MATLAB". MacOS would then look in Contents/MacOS for an executable by that name (so Contents/MacOS/MATLAB ) and would start it up . In this example that would be /Volumes/ZZ9PluralZ/Applications/MATLAB_R2020a.app/Contents/MacOS/MATLAB . Then MATLAB would take that name and go up two directories to /Volumes/ZZ9PluralZ/Applications/MATLAB_R2020a.app and call that matlabroot .
There is another way to start MATLAB on MacOS, which would involve running /Volumes/ZZ9PluralZ/Applications/MATLAB_R2020a.app/bin/matlab . In that case MATLAB would see that it was invoked from bin and would go up one directory instead of two.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Tags

Gefragt:

am 25 Sep. 2019

Kommentiert:

am 24 Jul. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by