matlab 循环里面获取键盘输入
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29function [ch, tim] = getkey(N,nonascii) % GETKEY - get a keypress % CH = GETKEY waits for a single keypress and returns the ASCII code. It % accepts all ascii characters, including backspace (8), space (32), % enter (13), etc, that can be typed on the keyboard. % Non-ascii keys (ctrl, alt, ..) return a NaN. CH is a double. % % CH = GETKEY(N) waits for N keypresses and returns their ASCII codes. % GETKEY(1) is the same as GETKEY without arguments. % % GETKEY('non-ascii') or GETKEY(N,'non-ascii') uses non-documented % matlab features to return a string describing the key pressed. % In this way keys like ctrl, alt, tab etc. can also distinguished. % The return is a string (when N = 1) or a cell array of strings. % % [CH,T] = GETKEY(...) also returns the time between the start of the % function and each keypress. This is, however, not that accurat
最后
以上就是虚拟煎饼最近收集整理的关于Matlab getkey的全部内容,更多相关Matlab内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复