Why do I get "-nodesktop: command not found" error
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I'm trying to run Matlab in a headless form from a Linux command line:
matlab -nodesktop -r myscript.m,quit
I get "-nodesktop: command not found" error. My Matlab version is R2013a. Is it something in my environment that needs to be set up?
Thank you.
0 Kommentare
Antworten (2)
Walter Roberson
am 9 Aug. 2018
You are not invoking MATLAB directly from its real binary: you are invoking a script that is setting up environment variables and then running MATLAB. But that script might be interfering with the parsing of the command line.
At the command line, you can investigate by starting with
which matlab
alias matlab
2 Kommentare
Walter Roberson
am 11 Aug. 2018
Bearbeitet: Walter Roberson
am 11 Aug. 2018
If you
ls -l $(which matlab)
then do the permissions show up with "other" having r-x or just --x ? If it is r-x then you can read the contents, such as with
file $(which matlab)
If the permissions are --x then it is probably an executable.
"I was told I need to compile Matlab in order to run it in a headless form."
MATLAB can be run headless by passing in -nodesktop or -nodesktop -nojvm, but those do require that MATLAB be installed (and licensed) on the machine. Compiling would be used to produce an executable that could run on a machine that had no MATLAB license.
Also, I suspect the Linux versions can still run under X, such as with ssh -X or ssh -Y into the remote machine.
Jan
am 8 Aug. 2018
I assume, Matlab cannot find "myscript.m". Are you sure it is in the path? Try
matlab -nodesktop -r "beep,quit"
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!