MATLAB: Ginput with right mouse button

ginput

hello, i would like to use apply ginput function in such way that the user will chose the amount of coordinates to save (left click) and when he decide to finish so he will click the right button on the mouse.
how do i apply this?
thanks

Best Answer

If you have the Image Processing Toolbox, you can use impoint() instead of ginput().