File Exchange

image thumbnail

Drag and drop in matlab app designer

version 1.0.0 (99.4 KB) by Lei
How to enable the Drag and drop in matlab app designer

20 Downloads

Updated 24 Oct 2018

View License

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.
https://au.mathworks.com/matlabcentral/answers/94681-how-do-i-implement-drag-and-drop-functionality-in-matlab

Cite As

Lei (2020). 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 .

Comments and Ratings (1)

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.

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags