NO MATLAB command specified

2 次查看(过去 30 天)
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

采纳的回答

Sanjana Ramakrishnan
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 个评论
Javier Naranjo
Javier Naranjo 2017-10-19
I solved it with
sudo ./matlab -nosplash -nodesktop -nodisplay -r "cd('~/fol1'); hello;exit"
Jan
Jan 2017-10-19
@Sanjana: I made the same mistake yesterday: The -r flag expects working Matlab code, not the path of a function.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by