Thank you for the suggestion Fernando. However, I observe the same result with your modified system command.
It seems like my system command is running asynchronously for some reason. Or at least Octave thinks it can move to the next command whereas MATLAB is working as I intend it to and not moving on until the solver runs and closes. I tried creating the string for the solver and its input file command on a different line and removing the '-echo' command (which I may not even need in MATLAB and seems like it may not be valid in Octave with the system command). Still the same behaviour. solver.exe runs but Octave moves on to the next commands before solver.exe finishes its run.
Seems unlikely but could it have something to do with the way I run Octave in my MS batch file?
start /wait E:\Octave\octave.vbs --no-gui -V script.m
I tried using a similar syntax with Octave's system command without success (opened a new window on top of the window opened for the Octave command line):
system(['start /wait solver.exe i=' filename{1}])
Not sure what else to try.
Any suggestions would be appreciated.
- Matt