delay on user input

5 visualizaciones (últimos 30 días)
Sag
Sag el 17 de Abr. de 2024
Respondida: Taylor el 17 de Abr. de 2024
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

Respuesta aceptada

Taylor
Taylor el 17 de Abr. de 2024
You can use uiwait with the "timeout" argument.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by