Effacer les filtres
Effacer les filtres

Save mouse movements on figure to table

2 vues (au cours des 30 derniers jours)
Rosanne Hart
Rosanne Hart le 21 Oct 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.

Réponses (1)

Shanmukha Voggu
Shanmukha Voggu le 25 Oct 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!

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by