How to get mouse coordinates in GUI (AppDesigner) ?

51 views (last 30 days)
I am using MATLAB App Designer and have inserted axes into the app.
When the user clicks a button, I want them to be able to then select a point on the axes. Basically, the functionality should be identical to ginput.
How should I do this? I am aware that related questions have been asked but am honestly not able to understand parts of those or the solutions don't seem to work well. It looks to be something to do with using ButtonDownFcn callback and CurrentPosition but I'm not able to understand how to use these.
Thanks for your help!

Accepted Answer

Ameer Hamza
Ameer Hamza on 2 Oct 2020
Edited: Ameer Hamza on 2 Oct 2020
Check the attached app for the demo.

Sign in to comment.

More Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by