XY plot data interactively
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, I am looking for a function which works very similarly to plot(x,y) - i.e. takes two identical size arrays and plots them in a 2D graph - but instead of showing all the values of x and y at once, it plots them over time (i.e. the sequence of the corresponding elements in x and y) as if it was a video.
Thanks
Giulio
댓글 수: 0
답변 (1개)
Akira Agata
2019년 11월 28일
The following is an example:
h = animatedline('LineStyle','none','Marker','o');
axis([0,4*pi,-1,1])
x = linspace(0,4*pi,100);
y = sin(x);
for k = 1:length(x)
addpoints(h,x(k),y(k));
drawnow
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!