How to close other program that matlab calls
Ältere Kommentare anzeigen
I am using MATLAB to write text files that are executed by another program, MODTRAN. My program calls MODTRAN and runs, but it does not close the program; in fact, I must click yes for the program to close. This is coming to be a huge problem because I am going to be running a loop with at least 3000 cycles, and I can't have the screen pop up 3000 times and click yes all those times.
This is the code I use to call MODTRAN:
system('cd C:/users/.../mod5_64/ && start Mod5.2.0.0_cons.exe');
Attached is the screen that I see. The program will continue to run even if I don't click anything, so I will have many pop ups and it will probably crash my computer.
Is there a way for to code something in matlab that will either close this MODTRAN when it is done, or click yes when it asks?
Thank you!
Akzeptierte Antwort
Weitere Antworten (1)
per isakson
am 28 Feb. 2014
Bearbeitet: per isakson
am 28 Feb. 2014
1 Stimme
If on Windows and you don't find any solution. Last resort is the DOS command taskkill. If you run several MODTRN simultaneously then you must know which to kill.
Kategorien
Mehr zu Spreadsheets finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!