概述
matlab 循环里面获取键盘输入
function [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 getkey所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复