MATLAB: Is there a way to not block the MATLAB command line when calling a DOS console program using the DOS or SYSTEM command

batchfileMATLABrunningsimultaneously

The MATLAB command line blocks execution when I call a DOS console application or command.
The following piece of code illustrates this behavior:
dos('my_DOS_program');
When my_DOS_program is running, I am unable to execute any commands on the MATLAB command line.

Best Answer

To prevent the DOS command from blocking MATLAB execution, run the DOS program in its own console window.
The following piece of code illustrates this:
dos('my_DOS_program &');
The '&' at the end of the string specifies that this DOS command must run in its own console window and not in MATLAB.
Using this allows MATLAB to execute while the DOS program runs.
Related Question