How to close other program that matlab calls
Afficher commentaires plus anciens
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!
Réponse acceptée
Plus de réponses (1)
per isakson
le 28 Fév 2014
Modifié(e) : per isakson
le 28 Fév 2014
1 vote
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.
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!