Hi all,
I vant to delay on user input, meaning that if the user wont input something within lets say 10 sec than the vatiable will get a defult value.
this is a schematic code of what I want to do, how can I apply it on Matlab?
UserInput = input('please enter a variable value:\n ')
delay (10 sec)
if not (UserInput)
UserInput = 10
end

 채택된 답변

Taylor
Taylor 2024년 4월 17일

0 개 추천

You can use uiwait with the "timeout" argument.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

Sag
2024년 4월 17일

답변:

2024년 4월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by