You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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.
% -------------------------------------------------------------------------
Cite As
Kang Zhao (2026). Trace the Position of Cursor without Click (https://www.mathworks.com/matlabcentral/fileexchange/4170-trace-the-position-of-cursor-without-click), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.1.0.0 (941 Bytes)
-
No License
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
