waitinput
%WAITINPUT Prompt for user input, but no longer than t seconds.
% output = WAITINPUT('Input something',t) gives the user the prompt in the
% text string and then waits for input from the keyboard by t seconds.
% R is the result. When user not specified s argument R will be a double,
% or if argument s i s eqal to 's', R will be a char. For other s
% argument function return an error.
% Function works only with alphanumeric characters.
%
% Example:
% waitinput('what is your name? ',10,'s')
%
% This function is inspired by Matlab INPUT function and GetKeyWait by
% Jos (10584) from File Exchange:
% http://www.mathworks.com/matlabcentral/fileexchange/8297-getkeywait
%
% See also INPUT, KEYBOARD.
%
% Copyright 2010 Grzegorz Knor
Cita come
Grzegorz Knor (2024). waitinput (https://www.mathworks.com/matlabcentral/fileexchange/28881-waitinput), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- MATLAB > Environment and Settings > Desktop >
- MATLAB > Mathematics > Elementary Math > Special Functions >
Tag
Riconoscimenti
Ispirato da: getkey, getkeywait
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.0.0 |