Matlab has a nifty feature: When started from (Windows) command line, it takes the current directory from there. With my installation that fails. During initialization it is correct, as can be seen in the directory window. But at the end of initialization it switches to the standard folder! THEN it runs the -r option and cannot find the referenced m-script file.
Why is that so? How to fix it?
By the way, is there any way to let a running instance of Matlab run a m-script from (Windows) command line, instead of letting a new instance open?
Best Answer