Animation delete previous point
显示 更早的评论
Hi
I'm trying to make an animation, where I only display one point at the time, right now the trajectory stays, and I want only one point displayed
any suggestions, i want it to look like this: https://www.youtube.com/watch?v=q1dqIcLi3N0
this is my code so far
x= Ball(:,1);
y= Ball(:,2);
%%
figure
curve = animatedline('marker','*','Color','r');
set(gca,'Xlim',[-6000 6000], 'Ylim',[-4000 4000])
for i= 1:length(Ball)
addpoints(curve,x(i),y(i));
drawnow
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Animation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!