How to run a .bat file in background without opening command prompt?
Mostrar comentarios más antiguos
Dear all, I am running a jet engine performance optimization in Matlab which has to call an external program. The external program is mainly constituted by a .bat file with the scope of solving the engine thermodynamic cycle (I have no control or access to the external program files). Matlab provides the input necessary to run the .bat and process the outputs. During the optimization, performed using fmincon, it happens that the external file get stock in an infinite loop without convergence for a set of Matlab sent input (this is normal). Therefore, I am running the external program in parallel with system(), using the & command and, when this happen, I kill the external run by means of the command "taskkill" in windows using again system() in Matlab. This is working perfectly. However, when the optimization runs, the command prompt showing the external program running keeps opening up and I can't figure out a way to prevent this to happen.
I would like to have the external program to run in background without showing all the time the black prompt, such that I can easily use the computer when the optimization runs. If the external program run directly through Matlab the prompt does not pop out automatically and the external program run is just visible on the Matlab command window. Is it possible to do the same when the same program runs in background?
I hope it is enough clear. Thank you very much in advance. Jacopo
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Share and Distribute Software en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!