MATLAB Answers


NO MATLAB command specified

Asked by Javier Naranjo on 17 Oct 2017
Latest activity Commented on by Jan
on 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.


Sign in to comment.

1 Answer

Answer by Sanjana Ramakrishnan on 19 Oct 2017
 Accepted Answer

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:


I solved it with
sudo ./matlab -nosplash -nodesktop -nodisplay -r "cd('~/fol1'); hello;exit"
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.