Using Data tip values in App designer

I want to use the data tip coordinates, so I want to create a new matrix and add the x and y values of the created data tip to the new matrix. Can someone help on how is it done?

답변 (1개)

Praveen Reddy
Praveen Reddy 2023년 8월 29일
편집: Praveen Reddy 2023년 8월 29일

0 개 추천

Hi Aaquib,
I understand that you want to add data tip coordinates on the axes component to a new matrix in app designer.
  • You can initialize a new matrix variable as shown below to store the coordinates
properties (Access = private)
dataTipMatrix = []; % Initialize an empty matrix
end
  • In your App Designer, navigate to the callback function where you want to capture coordinates, retrieve the coordinates and add it to the matrix as shown below
function YourCallbackFunction(app, event)
% intialize x,y with the data tip coordinates
% Add the coordinates to the data tip matrix
app.dataTipMatrix = [app.dataTipMatrix; x, y];
end
Hope this helps!

댓글 수: 1

Mohd Aaquib Khan
Mohd Aaquib Khan 2023년 8월 29일
Hi Praveen,
Actually I m not initializing the x and y, I want to mark the data tip on the plot and that coordinates should be added to the matrix.
I have figured it out, I will dd the answer in few days and close it.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품

릴리스

R2023a

질문:

2023년 8월 17일

댓글:

2023년 8월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by