how to assign increse/decrease values from arrowkeys

9 ビュー (過去 30 日間)
empy
empy 2015 年 6 月 29 日
編集済み: Sean de Wolski 2015 年 6 月 29 日
Hi, I have a simple problem here that i cannot solve.
I want to use arrowkeys to increase or decrease the values of my variables:
xpos = 5 ; ypos = 5 ;
I want to use the up, left, right, down arrowkeys to increase or decrease the values for xpos and ypos with +1, -1. So right arrowkey => xpos = xpos + 1 down arrowkey => ypos = ypos - 1
How do I do that?

回答 (1 件)

Sean de Wolski
Sean de Wolski 2015 年 6 月 29 日
編集済み: Sean de Wolski 2015 年 6 月 29 日
This can't be done with arrow keys, but can be done by putting the cursor on the number, right-clicking and selecting "Increment Value and Run Section"
And then:

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by