I have a matlab script xxx.m that runs fine within matlab's GUI command window, creating a couple of subdirectories and outputting some data into those subdirectories.
When i load Matlab at the bash command line without the GUI, and then try to call the script from a bash command line using
$ matlab -nodisplay -nodesktop -r "run xxx.m"
the script appears to run, but only creates the required output directories for the script's outputs without producing any of the actual output, and flags several errors within the script that do not exist when the script is run from the Matlab GUI command window.
Is this problem something to do with setting paths or environment variables?
(I'm quite used to basic bash scripting so I was hoping i could run pre-written matlab.m scripts seamlessly inside bash).