MATLAB Answers

NO MATLAB command specified

2 views (last 30 days)
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

  0 Comments

Sign in to comment.

Accepted Answer

Sanjana Ramakrishnan
Sanjana Ramakrishnan on 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 Comments

Javier Naranjo
Javier Naranjo on 19 Oct 2017
I solved it with
sudo ./matlab -nosplash -nodesktop -nodisplay -r "cd('~/fol1'); hello;exit"
Jan
Jan on 19 Oct 2017
@Sanjana: I made the same mistake yesterday: The -r flag expects working Matlab code, not the path of a function.

Sign in to comment.

More Answers (0)

Sign in to answer this question.