pause with time and keyboard
조회 수: 3 (최근 30일)
이전 댓글 표시
I have put the pause function in my code. After pause I would like to restart the script after some time (i.e. 10 seconds) or by press on the keyboard. Do you know how can I do?
Marco
댓글 수: 2
Titus Edelhofer
2015년 1월 9일
Hi Marco,
could you give some more details? I'm not sure what you want to achieve ...
Titus
답변 (1개)
Amos
2015년 1월 9일
Maybe you can start a parfor loop with two parallel tasks, and run a while loop in each of them - the first while loop checks for the time and writes a flag into a text file when 10s are over and the second while loop checks for input before it writes a flag into the same text file. Both while loops halt when the flag is set in the text file ...
Yes this is very ugly and I don't know if it works.
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!