waitinput

版本 1.0.0.0 (2.0 KB) 作者: Grzegorz Knor
WAITINPUT Prompt for user input, but no longer than t seconds.
964.0 次下载
更新时间 2010/9/29

查看许可证

%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

引用格式

Grzegorz Knor (2024). waitinput (https://www.mathworks.com/matlabcentral/fileexchange/28881-waitinput), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Desktop 的更多信息
致谢

参考作品: getkey, getkeywait

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0