wait until batch Cygwin simulataion finish?

4 ビュー (過去 30 日間)
Tunechi
Tunechi 2015 年 5 月 14 日
編集済み: Tunechi 2015 年 5 月 14 日
I am running batch file from matlab in a loop form. How can I make the matlab loop wait until the batch execution finished?
for k=1:1:3
dos('mrun.bat');
end

採用された回答

Walter Roberson
Walter Roberson 2015 年 5 月 14 日
If the .bat file does not start any interactive processes and does not use "&" to create a new process, then dos() will automatically wait for it to finish.
If the .bat file starts an interactive process (for example it might start up Excell) then you can loop testing to see if the processes are still alive; see this File Exchange Contribution or you can use tasklist
  1 件のコメント
Tunechi
Tunechi 2015 年 5 月 14 日
編集済み: Tunechi 2015 年 5 月 14 日
Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by