No License

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

» Watch video

Highlights from

5.0 | 5 ratings Rate this file 15 Downloads (last 30 days) File Size: 6.53 KB File ID: #12770 Version: 1.0



Frederic Moisy (view profile)


24 Oct 2006 (Updated )

Simple modification of GINPUT with custum cursor pointer

| Watch this File

File Information

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.
hold on
[x,y] = myginput(1,'crosshair');
hold off
MYGINPUT is copied from Matlab's GINPUT rev.


This file inspired Clickfit Oh For Curve Fitting By Eye/Hand and Gdist.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
25 Feb 2017 Lukasz Migas

Great little tool. Thanks.

07 Jan 2016 jon erickson

jon erickson (view profile)

Nice little function, worked perfectly for me. As is noted in a separate post (, the 3rd output arg does indeed specify which button was pressed--syntax of output args is exactly the same as ginput(...)

05 Aug 2011 Mauro Donzelli

13 Jan 2011 AwedBy Matlab

Very useful!

07 Jul 2008 Sugu leasa

Good job!

Contact us