File Exchange

image thumbnail

MYGINPUT

version 1.0 (6.53 KB) by

Simple modification of GINPUT with custum cursor pointer

23 Downloads

Updated

No License

MYGINPUT Graphical input from mouse with custum cursor pointer.

[X,Y] = MYGINPUT(N) gets N points from the current axes and returns the X- and Y-coordinates in length N vectors X and Y.
 
[X,Y] = MYGINPUT(N, POINTER) also specifies the cursor pointer, e.g. 'crosshair', 'arrow', 'circle' etc. See "Specifying the Figure Pointer" in Matlab's documentation to see the list of available pointers.
    
MYGINPUT is strictly equivalent to Matlab's original GINPUT, except that a second argument specifies the cursor pointer instead of the default 'fullcrosshair' pointer.
 
Example:
plot(1:2,1:2,'s');
hold on
[x,y] = myginput(1,'crosshair');
plot(x,y,'o');
hold off
 
 
MYGINPUT is copied from Matlab's GINPUT rev. 5.32.4.4.

Comments and Ratings (5)

Lukasz Migas

Great little tool. Thanks.

jon erickson

Nice little function, worked perfectly for me. As is noted in a separate post (http://www.mathworks.com/matlabcentral/answers/156143-change-mouse-cursor-appearance-in-ginput), the 3rd output arg does indeed specify which button was pressed--syntax of output args is exactly the same as ginput(...)

AwedBy Matlab

Very useful!

Sugu leasa

Good job!

MATLAB Release
MATLAB 7.2 (R2006a)
Acknowledgements

Inspired: gdist, clickfit_OH for curve fitting by eye/hand

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video