How to wait a keypress?

回答(1 个)

Stephen23
Stephen23 2015-4-20
编辑:Stephen23 2015-4-20

0 个投票

You can use pause to achieve this.

2 个评论

No, no! I would like to wait a specific character! For example pressing "a" to doing something and pressing "b" to do something else!
Stephen23
Stephen23 2015-4-20
编辑:Stephen23 2015-4-20
Then you could try using input, and calling switch with the value that the user inputs.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

提问:

2015-4-20

编辑:

2015-4-20

Community Treasure Hunt

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

Start Hunting!

Translated by