Hide a .bat file run from Command Window

8 次查看(过去 30 天)
Hi!
I'm running a program in batch mode using Matlab.
When I'm executing this bat file (!Run.bat) Matlab displays the entire simulation from the program (takes about 18 seconds).
When I execute the file with dos('Run.bat &') it runs in about 2 seconds, but Matlab skips the run completely.
So, my question is: Is there some way to run my .bat file without making Matlab show the entire simulation in the Command Window but not 'skip' the simulation?

采纳的回答

Christian W. Pedersen

更多回答(1 个)

Walter Roberson
Walter Roberson 2012-3-7
!Run.bat > NUL:
If you were using Unix (Linux, OS-X), the equivalent would be
!Run.bat > /dev/null

类别

Help CenterFile Exchange 中查找有关 Graphics Objects 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by