I'm working with a command line Matlab (i.e. remote ubuntu linux workstation) and am trying to execute a script.
When I ran:
matlab -nodesktop -nosplash -r "my_script.m"
matlab would open and give me an error message stating
Undefined variable "my_script" or class "my_script.m"
I found a thread on stackoverflow with a user having a similar problem: Matlab: Running an m-file from command-line
but when I attempted to implement the suggested syntax:
matlab -nodesktop -nosplash -r "run('my_script.m');"
I now get a syntax error,
Unexpected MATLAB expression.
Error in run (line 96)
evalin('caller', [script ';'])
I seldom use Matlab and even more rarely do so w/o a gui, so I've been trying without success to fix the syntax using information from online messageboards.