Save mouse movements on figure to table

3 次查看(过去 30 天)
I need to repeat manually track the shoreline from large numbers of shoreline timestacks (example attached). I have used an app that was mentioned here here as the foundation, and when I save as a .m file and input the following command into it, the app runs and the coordinates of each mouse movement are shown in the text box.
% Create UIAxes
app.UIAxes = uiaxes(app.UIFigure);
imshow('FB_1035.jpg','Parent',app.UIAxes); % this is the code that is inserted.
However, I need to be able to save these pixel coordinates in an array/table within the workspace. Is there a way to do so? It is not necessary for me to use an app to do so, but this seems to be the closest I have gotten to a solution so far.

回答(1 个)

Shanmukha Voggu
Shanmukha Voggu 2021-10-25
Hi Rosanne,
I understood that you want to save the cursor co-ordinates into MATLAB workspace. In order to do that, make changes to the traverseFcn as mentioned in the method-1 of this answer. Use assignin to assign the value of the desired variable in the workspace. You may require evalin in the process.
Refer this for more information.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by