This app demonstrate how to draw a ROI rectangular interactive to user mouse click, drag and drop within an image when using the Matlab App Designer.
It is adapted from the code found in the link and I accustomed it to the app designer environment.
wonderkismet (2021). Drag and drop in matlab app designer (https://www.mathworks.com/matlabcentral/fileexchange/69195-drag-and-drop-in-matlab-app-designer), MATLAB Central File Exchange. Retrieved .
does work. you just have to put an image called rice.png into the folder.
Doesn't work ('184.108.40.2061342 (R2020a) Update 5')
I am really grateful for your example. However, when I was changing the axis limits I noticed that your functions are updating the position of the object in pixel units, but the position of the object should be updated in axis units. If my axis limits are [0,1] in both directions the slightest move shifts the object out of the axis limits.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!