Trace the Position of Cursor without Click
by Kang Zhao
18 Nov 2003
(Updated 15 Nov 2008)
It works like GINPUT provided by MATLAB,but traces the position of cursor without click ...
|
Watch this File
|
| File Information |
| Description |
function [x,y]=gpos(h_axes)
%GPOS Get current position of cusor and return its coordinates in axes with handle h_axes
% h_axes - handle of specified axes
% [x,y] - cursor coordinates in axes h_aexs
%
% -------------------------------------------------------------------------
% Note:
% 1. This function should be called in the figure callback WindowButtonMotionFcn.
% 2. It works like GINPUT provided by Matlab,but it traces the position
% of cursor without click and is designed for 2-D axes.
% 3. It can also work even the units of figure and axes are inconsistent,
% or the direction of axes is reversed.
% ------------------------------------------------------------------------- |
| MATLAB release |
MATLAB 6.5 (R13)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (8) |
| 07 May 2004 |
drew slusser
|
|
|
| 20 Dec 2005 |
Jasper Menger
|
|
|
| 08 Mar 2007 |
Dietrich Lueerssen
|
|
|
| 18 Jan 2008 |
c Zhao
|
|
|
| 29 Jan 2008 |
Frank Pezzullo
|
|
|
| 28 Mar 2008 |
Tuss P.
|
|
|
| 22 Aug 2008 |
Daniel P.
|
|
|
| 19 Apr 2011 |
Matías Alonso
|
|
|
| Updates |
| 15 Nov 2008 |
bug fix |
|
Contact us at files@mathworks.com