wait until batch Cygwin simulataion finish?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!