Save mouse movements on figure to table

조회 수: 3 (최근 30일)
Rosanne Hart
Rosanne Hart 2021년 10월 21일
답변: Shanmukha Voggu 2021년 10월 25일
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