delay on user input

5 ビュー (過去 30 日間)
Sag
Sag 2024 年 4 月 17 日
回答済み: Taylor 2024 年 4 月 17 日
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 日
You can use uiwait with the "timeout" argument.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by