NO MATLAB command specified

3 vues (au cours des 30 derniers jours)
Javier Naranjo
Javier Naranjo le 17 Oct 2017
Commenté : Jan le 19 Oct 2017
Hello everybody,
I am running this command from the Linux Console
sudo ./matlab -r < fol1/hello.m -nosplash -nodesktop
And I get this output from the Linux Console:
No MATLAB command specified
I do not have any idea why this happens.
Thanks,
Javi

Réponse acceptée

Sanjana Ramakrishnan
Sanjana Ramakrishnan le 19 Oct 2017
Since you are using -r flag with matlab command, you would not require the pipe symbol to invoke the 'hello.m'. Modifying the command as below might help resolve the issue:
>>sudo ./matlab -r fol1/hello.m -nosplash -nodesktop
Refer the below link:
https://www.mathworks.com/matlabcentral/answers/230206-error-running-matlab-from-linux-command-line?s_tid=answers_rc1-2_p2_MLT
  2 commentaires
Javier Naranjo
Javier Naranjo le 19 Oct 2017
I solved it with
sudo ./matlab -nosplash -nodesktop -nodisplay -r "cd('~/fol1'); hello;exit"
Jan
Jan le 19 Oct 2017
@Sanjana: I made the same mistake yesterday: The -r flag expects working Matlab code, not the path of a function.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by