Suppose that;
I have an m-file at location:
C:\M1\M2\M3\mfile.m
And exe file of the matlab is at this location:
C:\E1\E2\E3\matlab.exe
I want to run this m-file with Matlab, from command-line, for example inside a .bat file. How can I do this, is there a way to do it?
On Linux you can do the same and you can actually send back to the shell a custom error code, like the following:
it prints
matlab exit code: 1
if the script throws an exception,matlab exit code: 0
otherwise.