From: Riikka on
http://www.mathworks.com/support/solutions/en/data/1-1V97EZ/?solution=1-1V97EZ

The solution behind the link above is what I want to do, but I don't manage to do this in my GUI. I have one axis and I would like the GUI to show the current position of the mouse in a text box.

In addition to this, i would like there to be an option to save coordinates by a mouse click when wanted. How is this done?

Thanks for your help!