필터 지우기
필터 지우기

update one plot in appdesigner

조회 수: 2 (최근 30일)
Leon
Leon 2022년 6월 19일
댓글: Rik 2022년 6월 20일
In appdesigner, I have multiple plots, I want to update one or more. The initial plot owrks, the update not. How to do this??
Many thx form you help.
hold(app.UIAxes, 'on');
h1 = plot(app.UIAxes,(1:20),'*');
h2 = plot(app.UIAxes,(3:30),'*');
hold(app.UIAxes, 'off');
pause(5);
set(h1, 'XData', (1:20), 'YData', (20:1));
drawnow;

채택된 답변

Rik
Rik 2022년 6월 20일
This code should work, once you fix the creation of the vector: 20:-1:1.
  댓글 수: 2
Leon
Leon 2022년 6월 20일
Hello Rik,
Thx for your answer, I missed that one:-(
Rik
Rik 2022년 6월 20일
No problem. It's a very easy mistake to make. I don't make it daily anymore, but I still ofter forget :-1:.
Maybe I should get in the habit of using :1: for upwards arrays, that way you can't forget :-1: when you need it.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by