matlab改变ginput的颜色,matlab ginput详解

functions:Graphical input from mouse or cursor

ginput提供了一个十字光标使我们能更精确的选择我们所需要的位置,并返回坐标值。函数调用形式为:

[x,y] = ginput(n)

[x,y] = ginput

[x,y,button] = ginput(...)

对于[x,y] =

ginput(n),能使你从当前的坐标系中读取n个点,并返回这n个点的x,y坐标,均为nX1的向量。可以按回车提前结束读数。

[x,y] = ginput 可以无限的读取坐标直到按下回车键。

[x,y,button] = ginput(...)

返回x和y的坐标,以及button值(1=左键,2=中,3=右)或者按键的ASXII码值。

Clicking an axes makes that axes

the current axes. Even if you set the current axes before calling

ginput, whichever axes you click becomes the current axes and

ginput returns points relative to that axes. If you select points

from multiple axes, the results returned are relative to the

coordinate system of the axes they come from.

example:

>> [x,y,button] = ginput(1)

x =

0.1118

y =

0.6623

button =

1

button返回次数,x,y分别返回的是鼠标所点的坐标。大家可以试试的 ,挺简单的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值