Save mouse movements on figure to table

1 visualizzazione (ultimi 30 giorni)
Rosanne Hart
Rosanne Hart il 21 Ott 2021
Risposto: Shanmukha Voggu il 25 Ott 2021
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.

Risposte (1)

Shanmukha Voggu
Shanmukha Voggu il 25 Ott 2021
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!

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by