Simplest way without modifying your original batch file would be to add an exit command to your system call.
system('yourScript.bat && exit &')
This will complete execution of "yourScript.bat" in a new DOS command window, and then close the spawned window.
1 Comment
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/302134-close-command-dos-window#comment_459375
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/302134-close-command-dos-window#comment_459375
Sign in to comment.