How to close other program that matlab calls
古いコメントを表示
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!
採用された回答
その他の回答 (1 件)
per isakson
2014 年 2 月 28 日
編集済み: per isakson
2014 年 2 月 28 日
1 投票
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.
カテゴリ
ヘルプ センター および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!