Figures update from respective function from iterative process
조회 수: 1 (최근 30일)
이전 댓글 표시
i have a code with an iterative process. Each step is done by a different function to allow easy future enhancements. Most of the functions have a plot for visualization (4 separate figures). Now each iteration creates a new figure for each function. So 2 iterations create 8 figures, 3 create 12 etc. I would like that during each iteration the figure is updated (so new info gets added to the previous figure its own function). So i end up with 4 figures where all info is visible for all iterations per function. Is there an easy way to do this? Thanks in advance Bert
댓글 수: 0
답변 (1개)
KSSV
2017년 11월 2일
figure(1)
h(1) = plot(rand(10,1),rand(10,1),'r') ;
figure(2)
h(2) = plot(rand(10,1),rand(10,1),'g') ;
for i = 1:10
set(h(1),'XData',rand(1,10),'YData',rand(1,10)) ;
set(h(2),'XData',rand(1,10),'YData',rand(1,10)) ;
pause(0.1)
end
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!